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

Support Node 16 #965

Merged
merged 58 commits into from
Feb 27, 2023
Merged
Changes from 1 commit
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
298e638
add explicit dependency on ws
raiyaj Feb 7, 2023
906b23e
add custom docs url for 403 errors
raiyaj Feb 7, 2023
b8d680d
remove performance timer
raiyaj Feb 7, 2023
fa17a85
add explicit support for node 16
raiyaj Feb 7, 2023
86f9353
add explicit pwa-kit-dev support for node 16
raiyaj Feb 7, 2023
3eb9ee1
add explicit support for node 16 across the board
raiyaj Feb 7, 2023
c9e24b6
delete performance timer tests
raiyaj Feb 7, 2023
e81ea18
add explicit support for node 18
raiyaj Feb 9, 2023
74081e3
add node 16 and 18 to test matrix
raiyaj Feb 9, 2023
4b463a5
Revert "add explicit support for node 18"
raiyaj Feb 10, 2023
5c23e0e
remove 18 from test matrix
raiyaj Feb 10, 2023
261d49a
fix use-product-view-modal test
raiyaj Feb 13, 2023
2e88658
fix use-wishlist test
raiyaj Feb 14, 2023
6684628
lint
raiyaj Feb 14, 2023
5678a28
fix product-view test
raiyaj Feb 15, 2023
4f3dd08
lint
raiyaj Feb 15, 2023
614549f
try to fix with-registration test
raiyaj Feb 15, 2023
5182c84
update changelog
raiyaj Feb 15, 2023
60ae753
Merge branch 'develop' into pwa-kit-runtime-node16
raiyaj Feb 15, 2023
3c2e5a4
update pwa-kit-dev changelog
raiyaj Feb 15, 2023
ea563c5
add node 16 to windows test matrix
raiyaj Feb 15, 2023
40be1e2
change default pwa kit version to 16.x
raiyaj Feb 16, 2023
942dad5
try to fix flaky reset-password test
raiyaj Feb 16, 2023
cdbe418
switch generated builds to node 16
raiyaj Feb 16, 2023
fdc6d21
add npm 7 and 8 to windows test matrix
raiyaj Feb 16, 2023
70e1bdf
try to make reset-password test even more resilient
raiyaj Feb 16, 2023
7a7567a
add -y flag to npx command to prevent timeouts when generating projec…
raiyaj Feb 17, 2023
58f8ca4
try to make registration test more resilient
raiyaj Feb 17, 2023
35dad46
try to make account test more resilient
raiyaj Feb 17, 2023
b571ee7
try to make registration test more resilient
raiyaj Feb 17, 2023
bdf0896
conditionally pass -y flag to npx based on current node/npm version
raiyaj Feb 17, 2023
f73e739
exclude unnecessary node/npm combinations from test matrices
raiyaj Feb 17, 2023
8078e1b
fix indentation
raiyaj Feb 17, 2023
25dc0d6
make sure pwa-kit-create-app@latest gets installed
raiyaj Feb 17, 2023
5674fe6
Merge branch 'develop' into pwa-kit-runtime-node16
raiyaj Feb 17, 2023
0f2cf9d
set npx flags based on the version of npm, not node
raiyaj Feb 17, 2023
1298a0f
update IS_DEFAULT_NPM
raiyaj Feb 17, 2023
f123067
try to make reset-password test more resilient
raiyaj Feb 17, 2023
d6e14c1
clean up tests
raiyaj Feb 19, 2023
3eb363b
fix sdk dir path
raiyaj Feb 22, 2023
d90306f
add logs
raiyaj Feb 22, 2023
85fbe74
make sure sdkDir resolves to pwa-kit-dev
raiyaj Feb 22, 2023
5c7552a
refactor
raiyaj Feb 22, 2023
0dcfef7
return a default path rather than throwing an error
raiyaj Feb 22, 2023
e7f7df6
Merge branch 'develop' into pwa-kit-runtime-node16
raiyaj Feb 22, 2023
f230864
update READMEs and babel configs
raiyaj Feb 22, 2023
0c50c68
try to make tests more resilient
raiyaj Feb 22, 2023
ee119ad
lint
raiyaj Feb 22, 2023
0e6e00e
add comment about looking for pwa-kit-dev node_modules in two places
raiyaj Feb 23, 2023
b7186e8
try to make tests more resilient
raiyaj Feb 23, 2023
38dbed1
undo unnecessary change
raiyaj Feb 23, 2023
5bc8c36
ensure pwa-kit publish steps are only run once
raiyaj Feb 24, 2023
570c53d
Merge branch 'develop' into pwa-kit-runtime-node16
raiyaj Feb 24, 2023
87cf7eb
remove node 16 / npm 6 builds
raiyaj Feb 25, 2023
cba5cb5
try to make reset-password test more resilient
raiyaj Feb 25, 2023
85cd2dc
Merge branch 'develop' into pwa-kit-runtime-node16
raiyaj Feb 27, 2023
c08035f
try to make registration test more resilient
raiyaj Feb 27, 2023
6ec6d7d
Merge branch 'develop' into pwa-kit-runtime-node16
raiyaj Feb 27, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
return a default path rather than throwing an error
  • Loading branch information
raiyaj committed Feb 22, 2023

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
commit 0dcfef7f4044ba32e09ba16def9f6ba3b66011f9
5 changes: 3 additions & 2 deletions packages/pwa-kit-dev/src/configs/webpack/config.js
Original file line number Diff line number Diff line change
@@ -69,12 +69,13 @@ const findInProjectThenSDK = (pkg) => {
resolve(__dirname, '..', '..', 'node_modules', pkg),
resolve(__dirname, '..', '..', '..', 'node_modules', pkg)
Copy link
Collaborator

@adamraya adamraya Feb 22, 2023

Choose a reason for hiding this comment

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

Good finding @raiyaj!
It looks like we don't need the last one since we saw that generates the wrong path with the duplicated node_modules folder.

Copy link
Contributor Author

@raiyaj raiyaj Feb 22, 2023

Choose a reason for hiding this comment

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

Thanks Adam! I was thinking of removing it initially, but I added some logging here (in the Setup Ubuntu Machine step), and saw that when a project is generated in CI, __dirname is /home/runner/work/pwa-kit/pwa-kit/packages/pwa-kit-dev/dist/configs/webpack, whereas locally it's /Users/rjessa/generated-test-project/node_modules/pwa-kit-dev/configs/webpack, so we need to try both options.

I copied the candidates idea from here, where we do something similar.

Copy link
Collaborator

Choose a reason for hiding this comment

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

The method's name findInProjectThenSDK implies two places but we now look at three places.
It can be confusing for anyone else looking at the logic or facing a similar problem in the future.

@raiyaj Do you mind leaving a comment in the code explaining why we need to do this to support NPM 7 and Node 16?

]
for (const candidate of candidates) {
let candidate
for (candidate of candidates) {
if (fs.existsSync(candidate)) {
return candidate
}
}
throw new Error(`${pkg} is not installed in the project or SDK`)
return candidate
}

const baseConfig = (target) => {