-
Notifications
You must be signed in to change notification settings - Fork 119
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update to node 18 and swap Lerna for Turbo (#1528)
* Update to Node 18 See https://alokai.atlassian.net/wiki/spaces/KB/pages/510033965/WIP+Node+version+bump+for+Integrations+and+Storefronts * Add turborepo * Collect coverage only from unit tests Because of turbo, unit tests and integration tests can run in different order. Before adding turbo, the test script was like "yarn test:unit && yarn test:integration". If both tests generated coverage, in the coverage folder there'd factually be the integration test coverage. But now that they run out of order, we don't know what's in there. Here I reverted to a state where coverage from unit tests is only reported, as you normally collect coverage from unit tests.
- Loading branch information
Showing
10 changed files
with
159 additions
and
2,960 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
"@vue-storefront/magento-api": major | ||
"@vue-storefront/magento-types": major | ||
"@vue-storefront/magento-sdk": major | ||
--- | ||
|
||
Changed minimum Node version from 16 to 18. The condition that was forcing the Node version to be lower than 19 is also removed. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -119,3 +119,4 @@ dist | |
.graphqlconfig | ||
.idea | ||
docs.sh | ||
.turbo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,11 +12,12 @@ | |
], | ||
"scripts": { | ||
"prepare": "husky install", | ||
"build": "lerna run build", | ||
"test": "lerna run test", | ||
"test:unit": "lerna run test:unit", | ||
"test:integration": "lerna run test:integration", | ||
"lint": "lerna run lint", | ||
"build": "turbo run build", | ||
"test": "turbo run test", | ||
"test:unit": "turbo run test:unit", | ||
"test:integration": "turbo run test:integration", | ||
"lint": "turbo run lint", | ||
"ci": "turbo run build test:unit test:integration lint --cache-dir=.turbo", | ||
"changesets:version": "yarn changeset version && YARN_ENABLE_IMMUTABLE_INSTALLS=false yarn install && yarn prepare:docs", | ||
"changesets:publish": "yarn build && yarn changeset publish", | ||
"prepare:docs": "cd docs && yarn install && yarn api-extract && yarn copy-changelog" | ||
|
@@ -30,13 +31,13 @@ | |
"@vue-storefront/rollup-config": "^0.0.7", | ||
"all-contributors-cli": "^6.20.0", | ||
"esbuild": "^0.14.23", | ||
"lerna": "^4.0.0", | ||
"lint-staged": "^12.3.3", | ||
"rimraf": "^5.0.0", | ||
"turbo": "^1.13.3", | ||
"typescript": "^5" | ||
}, | ||
"engines": { | ||
"node": ">=16.x.x", | ||
"node": ">=18", | ||
"yarn": "1.x.x||>=3.x.x" | ||
}, | ||
"packageManager": "[email protected]" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
{ | ||
"$schema": "https://turbo.build/schema.json", | ||
"pipeline": { | ||
"build": { | ||
"dependsOn": ["^build"], | ||
"outputs": ["lib/**", "server/**"] | ||
}, | ||
"test:unit": { | ||
// Sometimes in unit tests of SDK we refer to the "types" package of the integration | ||
// so this means the dependencies of the packages need to be built | ||
"dependsOn": ["^build"], | ||
"inputs": ["src/**/*.ts", "__tests__/unit/**/*.ts"], | ||
"outputs": ["coverage/**"] | ||
}, | ||
"test:integration": { | ||
// Similarly to unit tests, people just freely import stuff from subdeps :( | ||
"dependsOn": ["^build"], | ||
"inputs": ["src/**/*.ts", "__tests__/integration/**/*.ts"], | ||
"outputs": ["coverage/**"] | ||
}, | ||
"lint": { | ||
// ESLint fails the 'is this import statement resolveable?' rule if the | ||
// dependencies of some package aren't built | ||
"dependsOn": ["^build"] | ||
} | ||
} | ||
} |
Oops, something went wrong.