-
Notifications
You must be signed in to change notification settings - Fork 11
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
Node 16 upgrade and peer dependency cleanup #250
Merged
Merged
Changes from all commits
Commits
Show all changes
31 commits
Select commit
Hold shift + click to select a range
6c8d611
fix: resolve most peer deps warnings in utils package
adamstankiewicz c0e6df1
fix: address peer dependency issues
adamstankiewicz 3fb052c
fix: moar updates
adamstankiewicz ebab6bb
build: update ci.yml github action workflow
adamstankiewicz d73fa11
build: use node 16 to install deps
adamstankiewicz 5a8cbf8
build: use node matrix in ci
adamstankiewicz 95c879e
build: adds NPM workspaces to package.json
adamstankiewicz 036ae9e
chore: upgrade @edx/frontend-platform devDeps
adamstankiewicz 5317170
fix: update package-lock.json
adamstankiewicz 3c68baf
fix: regenerate package-lock.json files
adamstankiewicz ef00ec9
build: remove workspaces from package.json
adamstankiewicz 8763515
chore: move prop types to devDeps
adamstankiewicz 3680827
chore: move prop-types back to deps due to eslint error
adamstankiewicz e8d7c89
build: use npm i vs npm ci
adamstankiewicz 8a8dcf9
fix: push up local changes
adamstankiewicz 851a12f
fix: add extendJestConfig helper function
adamstankiewicz 80c581e
fix: make things work
adamstankiewicz 77941a0
build: only run CI in Node 16
adamstankiewicz 8b9be68
build: run CI workflow on pull_request actions
adamstankiewicz 9e05565
build: only install npm packages at root with workspaces
adamstankiewicz 3710f45
build: only install npm packages at root with workspaces pt2
adamstankiewicz b20474a
build: update how branch name is retrieved in version dry run
adamstankiewicz 7bd6dce
build: only install npm packages at root with workspaces pt2 again
adamstankiewicz 8200d01
build: try to fix detached head issue
adamstankiewicz 3d5a36e
build: try to fix detached head issue pt2
adamstankiewicz 6198016
build: remove eslint-import-resolver-alias
adamstankiewicz 3c517b3
build: run workspaces command using npm
adamstankiewicz ea3cfb3
build: update npm scripts to use npm workspaces and update readme
adamstankiewicz 53f4fa1
feat: drop support for Node 12 and add support for Node 16
adamstankiewicz 08b7563
build: attempt to fetch tags in checkout workflow step
adamstankiewicz 465f67f
build: move back to pulling tags as separate step
adamstankiewicz File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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 |
---|---|---|
@@ -1,46 +1,44 @@ | ||
name: CI | ||
|
||
on: [push] | ||
on: [pull_request] | ||
|
||
jobs: | ||
build: | ||
tests: | ||
name: Build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
# pulls all commits (needed for lerna / semantic release to correctly version) | ||
fetch-depth: 0 | ||
# pulls all tags (needed for lerna / semantic release to correctly version) | ||
- run: git fetch --depth=1 origin +refs/tags/*:refs/tags/* | ||
- name: Setup Nodejs | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: 12 | ||
# lerna expects to be authenticated for publishing to NPM. This step will fail CI if NPM is not | ||
# authenticated, even though this build does _not_ attempt to publish, as an extra check before merge | ||
# that Lerna is set to publish. | ||
- name: Check NPM authentication | ||
run: | | ||
echo "//registry.npmjs.org/:_authToken=${{ secrets.SEMANTIC_RELEASE_NPM_TOKEN }}" >> .npmrc | ||
npm whoami | ||
- name: Install and Setup Dependencies | ||
run: | | ||
npm install | ||
lerna bootstrap --include-dependencies --include-dependents --since origin/master | ||
# build must come before running linting and tests for the `dist` directory to exist. | ||
- name: Build | ||
run: lerna run build --include-dependencies --include-dependents --since origin/master --parallel | ||
- name: Lint | ||
run: lerna run lint --include-dependencies --include-dependents --since origin/master --parallel | ||
- name: Test | ||
run: lerna run test --include-dependencies --include-dependents --since origin/master --parallel | ||
- name: Coverage Report | ||
uses: codecov/codecov-action@v1 | ||
- name: Extract branch name | ||
shell: bash | ||
run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})" | ||
id: extract_branch | ||
- name: Preview Updated Versions (dry run) | ||
run: lerna version --allow-branch ${{ steps.extract_branch.outputs.branch }} --no-git-tag-version --no-changelog --no-push --yes | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
# pulls all commits (needed for lerna / semantic release to correctly version) | ||
fetch-depth: 0 | ||
# pulls all tags (needed for lerna / semantic release to correctly version) | ||
- name: Pull all tags | ||
run: git fetch --depth=1 origin +refs/tags/*:refs/tags/* | ||
- name: Setup Nodejs | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 16 | ||
# lerna expects to be authenticated for publishing to NPM. This step will fail CI if NPM is not | ||
# authenticated, even though this build does _not_ attempt to publish, as an extra check before merge | ||
# that Lerna is set to publish. | ||
- name: Check NPM authentication | ||
run: | | ||
echo "//registry.npmjs.org/:_authToken=${{ secrets.SEMANTIC_RELEASE_NPM_TOKEN }}" >> .npmrc | ||
npm whoami | ||
- name: Install and Setup Dependencies | ||
run: npm run setup | ||
# build must come before running linting and tests for the `dist` directory to exist. | ||
- name: Build | ||
run: npm run build | ||
- name: Lint | ||
run: npm run lint | ||
- name: Test | ||
run: npm run test | ||
- name: Coverage Report | ||
uses: codecov/codecov-action@v2 | ||
- name: Preview Updated Versions (dry run) | ||
# switch from detatched head to a real branch so we can pass it to `--allow-branch` | ||
run: | | ||
git switch -c "actual-branch-not-detached-head" | ||
lerna version --allow-branch actual-branch-not-detached-head --no-git-tag-version --no-changelog --no-push --yes | ||
Comment on lines
+43
to
+44
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. By changing the |
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 |
---|---|---|
@@ -1 +1 @@ | ||
12 | ||
16 |
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,13 @@ | ||
const path = require('path'); | ||
|
||
const extendESLintConfig = (config) => { | ||
const importNoUnresolved = config.rules['import/no-unresolved']; | ||
if (importNoUnresolved ) { | ||
const originalIgnore = importNoUnresolved[1].ignore; | ||
if (!originalIgnore.includes('@edx/frontend-enterprise-*')) { | ||
importNoUnresolved[1].ignore = [...originalIgnore, '@edx/frontend-enterprise-*']; | ||
} | ||
} | ||
}; | ||
|
||
module.exports = extendESLintConfig; |
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,10 @@ | ||
const extendJestConfig = (config) => { | ||
const modulePathsToIgnore = ['<rootDir>/dist']; | ||
config.modulePathIgnorePatterns = config.modulePathIgnorePatterns ? [...config.modulePathIgnorePatterns, ...modulePathsToIgnore] : modulePathsToIgnore; | ||
config.moduleNameMapper = { | ||
...config.moduleNameMapper, | ||
'@edx/frontend-enterprise-(.*)': '<rootDir>/../$1/src', | ||
}; | ||
}; | ||
|
||
module.exports = extendJestConfig; |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This repository is now relying on NPM workspaces. As such, it is not compatible with Node 12 or Node 14, as NPM workspaces require
npm
v7+, so we will only run against Node 16.