-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #13 from sevenwestmedia-labs/chore/nx-upgrade
upgrade nx, node, pnpm, typescript and more
- Loading branch information
Showing
71 changed files
with
7,077 additions
and
7,380 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 |
---|---|---|
@@ -1,19 +1,30 @@ | ||
# Editor configuration, see http://editorconfig.org | ||
# http://editorconfig.org | ||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
indent_style = space | ||
indent_size = 2 | ||
insert_final_newline = true | ||
end_of_line = lf | ||
charset = utf-8 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true | ||
|
||
[*.ts] | ||
indent_size = 4 | ||
|
||
[*.json] | ||
[*.js] | ||
indent_size = 4 | ||
|
||
[*.tsx] | ||
indent_size = 4 | ||
|
||
[*.md] | ||
max_line_length = off | ||
trim_trailing_whitespace = false | ||
[*.jsx] | ||
indent_size = 4 | ||
|
||
[*.json] | ||
indent_size = 2 | ||
|
||
[*.yml] | ||
indent_size = 2 | ||
|
||
[*.yaml] | ||
indent_size = 2 |
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,2 @@ | ||
node_modules | ||
dist/ |
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,37 +1,24 @@ | ||
{ | ||
"root": true, | ||
"ignorePatterns": ["**/*"], | ||
"plugins": ["@nrwl/nx"], | ||
"overrides": [ | ||
{ | ||
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"], | ||
"rules": { | ||
"@nrwl/nx/enforce-module-boundaries": [ | ||
"error", | ||
{ | ||
"enforceBuildableLibDependency": true, | ||
"allow": [], | ||
"depConstraints": [ | ||
{ | ||
"sourceTag": "*", | ||
"onlyDependOnLibsWithTags": ["*"] | ||
} | ||
] | ||
} | ||
] | ||
} | ||
}, | ||
{ | ||
"files": ["*.ts", "*.tsx"], | ||
"extends": ["plugin:@nrwl/nx/typescript"], | ||
"rules": { | ||
"@typescript-eslint/no-empty-function": "off" | ||
} | ||
}, | ||
{ | ||
"files": ["*.js", "*.jsx"], | ||
"extends": ["plugin:@nrwl/nx/javascript"], | ||
"rules": {} | ||
} | ||
] | ||
"root": true, | ||
"ignorePatterns": ["!**/*"], | ||
"plugins": ["@nx"], | ||
"overrides": [ | ||
{ | ||
"files": ["*.ts", "*.tsx"], | ||
"extends": ["plugin:@nx/typescript"], | ||
"rules": {} | ||
}, | ||
{ | ||
"files": ["*.js", "*.jsx"], | ||
"extends": ["plugin:@nx/javascript"], | ||
"rules": {} | ||
}, | ||
{ | ||
"files": ["*.spec.ts", "*.spec.tsx", "*.spec.js", "*.spec.jsx"], | ||
"env": { | ||
"jest": true | ||
}, | ||
"rules": {} | ||
} | ||
] | ||
} |
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 |
---|---|---|
|
@@ -7,92 +7,22 @@ on: | |
- master | ||
|
||
jobs: | ||
version: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
changes: ${{ steps.version.outputs.changes }} # map step output to job output | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@master | ||
with: | ||
# This makes Actions fetch all Git history so that Changesets can generate changelogs with the correct commits | ||
fetch-depth: 0 | ||
token: ${{ secrets.SERVICE_ACCOUNT_PAT }} | ||
|
||
- name: Enable node | ||
uses: actions/setup-node@master | ||
with: | ||
node-version: 14.x | ||
registry-url: 'https://registry.npmjs.org' | ||
scope: '@wanews' | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
|
||
- name: Version command | ||
id: version | ||
run: | | ||
npm install --no-package-lock --no-save @changesets/cli | ||
echo ::set-output name=changes::$(npx changeset version 2>&1 | grep -q 'No unreleased changesets found' && echo 'false' || echo 'true') | ||
- name: Push changes | ||
if: steps.version.outputs.changes == 'true' | ||
run: | | ||
git config user.email "[email protected]" | ||
git config user.name "SWM GitHub Service Account" | ||
git add -A | ||
git commit -m "Version packages" || echo "No changes to commit" | ||
git push | ||
build: | ||
runs-on: ubuntu-latest | ||
needs: version | ||
if: always() && needs.version.outputs.changes == 'false' | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@master | ||
with: | ||
# This makes Actions fetch all Git history so that Changesets can generate changelogs with the correct commits | ||
fetch-depth: 0 | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Enable node | ||
uses: actions/setup-node@master | ||
- uses: pnpm/action-setup@v4 | ||
with: | ||
node-version: 14.x | ||
registry-url: 'https://registry.npmjs.org' | ||
scope: '@wanews' | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
run_install: false | ||
|
||
- name: Cache .pnpm-store | ||
uses: actions/cache@v1 | ||
- uses: actions/setup-node@v4 | ||
with: | ||
path: ~/.pnpm-store | ||
key: ${{ runner.os }}-node${{ matrix.node-version }}-${{ hashFiles('**/pnpm-lock.yaml') }} | ||
|
||
- name: Install pnpm | ||
run: | | ||
npm i -g pnpm | ||
pnpm set verify-store-integrity false | ||
- name: pnpm install | ||
run: | | ||
pnpm install --frozen-lockfile | ||
cache: pnpm | ||
node-version-file: .nvmrc | ||
|
||
- name: Type check | ||
run: pnpm run build-tsc | ||
- run: pnpm run build | ||
|
||
- name: Lint types and code | ||
run: pnpm run lint | ||
- run: pnpm run lint | ||
|
||
- name: Run tests | ||
run: pnpm test | ||
|
||
- name: Package | ||
run: pnpm package | ||
|
||
- name: Release packages | ||
uses: changesets/action@master | ||
with: | ||
publish: pnpx changeset publish | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.SERVICE_ACCOUNT_PAT }} | ||
- run: pnpm test |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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 was deleted.
Oops, something went wrong.
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 @@ | ||
.nvmrc |
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,2 @@ | ||
strict-peer-dependencies=false | ||
auto-install-peers=true |
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 @@ | ||
20 |
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,5 +1,5 @@ | ||
# Add files here to ignore them from prettier formatting | ||
|
||
/dist | ||
/coverage | ||
workspace.json | ||
/.nx/cache | ||
/.nx/workspace-data |
File renamed without changes.
Oops, something went wrong.