enhancement(cli): #1639 configure rollup bundle output for import attributes#1621
enhancement(cli): #1639 configure rollup bundle output for import attributes#1621thescientist13 wants to merge 5 commits intomasterfrom
Conversation
a101cf6 to
f96aff4
Compare
|
Test failures seem to be due to a regression in Node on Windows? Because the version in our .npmrc file works for me on Parallels (22.18.0) owenbuckley@OWENBUCKLEY5945 MINGW64 ~/Workspace/greenwood (enhancment/rollup-import-attributes-normalization)
$ nvm use
Found '/c/Users/owenbuckley/Workspace/greenwood/.nvmrc' with version <22.18.0>
Now using node v22.18.0 (npm v10.9.3)
owenbuckley@OWENBUCKLEY5945 MINGW64 ~/Workspace/greenwood (enhancment/rollup-import-attributes-normalization)
$ yarn test
yarn run v1.22.22
$ cross-env BROWSERSLIST_IGNORE_OLD_DATA=true __GWD_ROLLUP_MODE__=strict NODE_NO_WARNINGS=1 c8 mocha --exclude "./packages/**/test/cases/loaders-*/**" "./packages/**/**/*.spec.js"
Build Greenwood With:
AWS Adapter plugin output
Default Output
✔ should output the expected number of serverless function output folders for SSR pages
✔ should output the expected number of serverless function output folders for API routes
✔ should output the expected package.json for each serverless function
Greeting API Route adapter
✔ should return the expected response when the serverless adapter entry point handler is invoked
✔ should not have a shared asset for the card component
Fragments API Route adapter
✔ should return the expected response when the serverless adapter entry point handler is invoked (256ms)
✔ should have a route chunk
Submit JSON API Route adapter
✔ should return the expected response when the serverless adapter entry point handler is invoked
Submit FormData JSON API Route adapter
✔ should return the expected response when the serverless adapter entry point handler is invoked
Search API Route adapter
✔ should return the expected response when the serverless adapter entry point handler is invoked (146ms)
Nested API Route adapter
✔ should return the expected response when the serverless adapter entry point handler is invoked
Artists SSR Page adapter
✔ should return the expected response when the serverless adapter entry point handler is invoked (226ms)
Blog Index (collision test) SSR Page adapter
✔ should return the expected response when the serverless adapter entry point handler is invoked (162ms)
Blog First Post (nested) SSR Page adapter
✔ should return the expected response when the serverless adapter entry point handler is invoked (153ms)
Index (collision test) SSR Page adapter
✔ should return the expected response when the serverless adapter entry point handler is invoked (179ms)
Users SSR Page adapter
✔ should return the expected response when the serverless adapter entry point handler is invoked (196ms)
Post SSR Page adapter
✔ should return the expected response when the serverless adapter entry point handler is invoked (327ms)
17 passing (34s)But as soon as I upgrade to the one from GitHub Actions (22.21.1), it fails owenbuckley@OWENBUCKLEY5945 MINGW64 ~/Workspace/greenwood (enhancment/rollup-import-attributes-normalization)
$ nvm install
Found '/c/Users/owenbuckley/Workspace/greenwood/.nvmrc' with version <22.21.1>
Downloading and installing node v22.21.1...
Downloading https://nodejs.org/dist/v22.21.1/node-v22.21.1-win-x64.zip...
######################################################################################################################################################################### 100.0%
Computing checksum with sha256sum
Checksums matched!
Now using node v22.21.1 (npm v10.9.4)
owenbuckley@OWENBUCKLEY5945 MINGW64 ~/Workspace/greenwood (enhancment/rollup-import-attributes-normalization)
$ yarn test
yarn run v1.22.22
$ cross-env BROWSERSLIST_IGNORE_OLD_DATA=true __GWD_ROLLUP_MODE__=strict NODE_NO_WARNINGS=1 c8 mocha --exclude "./packages/**/test/cases/loaders-*/**" "./packages/**/**/*.spec.js"
Build Greenwood With:
AWS Adapter plugin output
Default Output
1) should output the expected number of serverless function output folders for SSR pages
2) should output the expected number of serverless function output folders for API routes
✔ should output the expected package.json for each serverless function
Greeting API Route adapter
3) should return the expected response when the serverless adapter entry point handler is invoked
✔ should not have a shared asset for the card component
Fragments API Route adapter
4) should return the expected response when the serverless adapter entry point handler is invoked
5) should have a route chunk
Submit JSON API Route adapter
6) should return the expected response when the serverless adapter entry point handler is invoked
Submit FormData JSON API Route adapter
7) should return the expected response when the serverless adapter entry point handler is invoked
Search API Route adapter
8) should return the expected response when the serverless adapter entry point handler is invoked
Nested API Route adapter
9) should return the expected response when the serverless adapter entry point handler is invoked
Artists SSR Page adapter
10) should return the expected response when the serverless adapter entry point handler is invoked
Blog Index (collision test) SSR Page adapter
11) should return the expected response when the serverless adapter entry point handler is invoked
Blog First Post (nested) SSR Page adapter
12) should return the expected response when the serverless adapter entry point handler is invoked
Index (collision test) SSR Page adapter
13) should return the expected response when the serverless adapter entry point handler is invoked
Users SSR Page adapter
14) should return the expected response when the serverless adapter entry point handler is invoked
Post SSR Page adapter
15) should return the expected response when the serverless adapter entry point handler is invoked
2 passing (3s)
15 failingLet me test by pinning GitHub Actions and see what happens 🤞 |
|
OK, this is interesting. when it fails, it looks like the build isn't actually happening? WORKING $ yarn test
yarn run v1.22.22
$ cross-env BROWSERSLIST_IGNORE_OLD_DATA=true __GWD_ROLLUP_MODE__=strict NODE_NO_WARNINGS=1 c8 mocha --exclude "./packages/**/test/cases/loaders-*/**" "./packages/**/**/*.spec.js"
Build Greenwood With:
AWS Adapter plugin output
-------------------------------------------------------
Welcome to Greenwood (v0.34.0-alpha.2) ♻️
-------------------------------------------------------
Running Greenwood with the build command.
Initializing project config
Initializing project workspace contexts
Generating graph of workspace files...
building from local sources...
pages to generate
success, done generating all pages!
bundling static assets...
bundling dynamic pages...
bundling API routes...
optimizing static pages....
copying file... .greenwood/manifest.json
Default Output
✔ should output the expected number of serverless function output folders for SSR pages
✔ should output the expected number of serverless function output folders for API routes
✔ should output the expected package.json for each serverless functionNOT WORKING $ yarn test
yarn run v1.22.22
$ cross-env BROWSERSLIST_IGNORE_OLD_DATA=true __GWD_ROLLUP_MODE__=strict NODE_NO_WARNINGS=1 c8 mocha --exclude "./packages/**/test/cases/loaders-*/**" "./packages/**/**/*.spec.js"
Build Greenwood With:
AWS Adapter plugin output
-------------------------------------------------------
Welcome to Greenwood (v0.34.0-alpha.2) ♻️
-------------------------------------------------------
Running Greenwood with the build command.
Initializing project config
Initializing project workspace contexts
Generating graph of workspace files...
building from local sources...
Default Output
1) should output the expected number of serverless function output folders for SSR pages
2) should output the expected number of serverless function output folders for API routes
✔ should output the expected package.json for each serverless function |
|
Maybe I messed up the lockfile, builds are passing now though in #1629 🎉 (or maybe it was the rollup upgrade? 🤔 ) |
|
Just for fun, decided to test out just regenerating the entire lock file, and now we get a stable version of terser (had to adjust test cases a little bit) ➜ greenwood git:(enhancment/rollup-import-attributes-normalization) ✗ yarn why terser
yarn why v1.22.22
[1/4] 🤔 Why do we have the module "terser"...?
[2/4] 🚚 Initialising dependency graph...
[3/4] 🔍 Finding dependency...
[4/4] 🚡 Calculating file sizes...
=> Found "terser@5.46.0"
info Reasons this module exists
- "_project_#@greenwood#cli#@rollup#plugin-terser" depends on it
- Hoisted from "_project_#@greenwood#cli#@rollup#plugin-terser#terser"
info Disk size without dependencies: "2.38MB"
info Disk size with unique dependencies: "3.31MB"
info Disk size with transitive dependencies: "4.86MB"
info Number of shared dependencies: 10
✨ Done in 0.53s.But as seems to be a classic thursday morning move, GitHub Actions just stopped running even though they just on these two PRs a few moments ago (#1630 / #1631) 😭 🤷♂️ If this does help, might set that up as its own PR, but for now let me test on local windows while I wait for GitHub Actions to get itself together |
|
Still seemingly getting the same issue locally, will try invoking another GitHub Actions run 🙄 (but at least #1629 seems to be working in its limited scope 🤷♂️ ) |
Related Issue
resolves #1639
Documentation
N / A
Summary of Changes
with) as assertions (assert) are the defaultTODO