Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: move files to build cache after files are uploaded instead of copying them before uploads #753

Merged
merged 14 commits into from
Jan 20, 2025
Merged
6 changes: 3 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '*'
node-version: '18'
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

- name: Global Node packages cache
uses: actions/cache@v3
with:
Expand All @@ -29,7 +29,7 @@ jobs:
key:
ubuntu-build-${{ env.cache-name }}-${{
hashFiles('plugin/test/fixtures/**/package.json') }}-node-modules
- run: npm install -g netlify-cli
- run: npm install -g netlify-cli@18.0.0
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there seems to be regression in latest version of cli (18.0.1) that result in skipping rewrites to .netlify/functions/__api and hitting framework's dev server directly which trips up the tests - I'm pinning it for now to "fix" the tests

I suspect it's caused by netlify/cli#6994 and reported in https://netlify.slack.com/archives/C07686YAY13/p1737134106866159?thread_ts=1736521386.323879&cid=C07686YAY13

- run: npm ci
- run: cd plugin && npm ci && npm run build
- run: npm test
Expand All @@ -56,7 +56,7 @@ jobs:
key:
macOS-build-${{ env.cache-name }}-${{
hashFiles('plugin/test/fixtures/**/package.json') }}-node-modules
- run: npm install -g netlify-cli
- run: npm install -g netlify-cli@18.0.0
- run: npm ci
- run: cd plugin && npm ci && npm run build
- run: npm test
2 changes: 1 addition & 1 deletion demo-v5/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
},
"dependencies": {
"@sindresorhus/slugify": "^1.1.2",
"gatsby": "next",
"gatsby": "5.11.0",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

last version pre adapters that result in build plugin actually doing anything

"gatsby-plugin-image": "next",
"gatsby-plugin-sharp": "next",
"gatsby-source-filesystem": "next",
Expand Down
2,436 changes: 1,801 additions & 635 deletions package-lock.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"prettier": "--loglevel=warn \"{plugin,demo,.github}/**/*.{ts,js,md,yml,json,html}\" \"*.{ts,js,yml,json,html}\" \".*.{ts,js,yml,json,html}\" \"!package-lock.json\""
},
"devDependencies": {
"@netlify/build": "^29.36.1",
"@netlify/build": "^29.58.7",
"@netlify/eslint-config-node": "7.0.1",
"@types/jest": "^29.0.0",
"ava": "^5.0.0",
Expand Down
Loading
Loading