Closed aloisklink closed 1 year ago
Thanks, I've merged this in. It's still unlikely that the test will pass for Node 14, since Vue 3 (the framework I use, and thus the one vite-plugin-singlefile-example
is build on) requires Node 16.
It's still unlikely that the test will pass for Node 14, since Vue 3 (the framework I use, and thus the one vite-plugin-singlefile-example is build on) requires Node 16.
It seems to be working fine, but that might just be random-luck because the example project doesn't use any Node.JS v16 specific code in Vue (but future Vue versions might break this)!
If the vite-plugin-singlefile-example
ever does fail, it should be easy to remove 14
from the following line https://github.com/richardtallent/vite-plugin-singlefile/blob/03d601f012d4e77170c395c378a724d137844ffd/.github/workflows/test.yml#L35
After all, the main purpose of CI is to make the programmer's life easier by automating tests. If it becomes too hard to fix CI-only issues, it might just be easier to get rid of CI :)
It looks like I was wrong about https://github.com/richardtallent/vite-plugin-singlefile/pull/64#discussion_r1019713613 (my fault, I should have tested it), the CI didn't actually work in Node v14 due to a different reason:
NPM versions before 7 do not automatically install
"peerDependencies"
when runningnpm install
locally, so do not work with this repo (this behaviour is also the default foryarn
)Because the GitHub
actions/setup-node@v3
comes with NPM v6 for Node v14, this means we need to manually upgrade to NPM@>=7 for CI to run.Design Decisions
It's also possible to fix this issue by copying your
"peerDependencies"
to"devDependencies"
, to supportnpm@6
andyarn
, but considering they're only needed for local/development installs, it's probably not worth the effort to support them!