Skip to content

Commit

Permalink
chore(deps): migrate all the things to nx 18 and angular 17
Browse files Browse the repository at this point in the history
  • Loading branch information
dhdaines committed Apr 10, 2024
1 parent 925d660 commit f247699
Show file tree
Hide file tree
Showing 24 changed files with 17,326 additions and 54,620 deletions.
8 changes: 4 additions & 4 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"root": true,
"ignorePatterns": ["**/*"],
"plugins": ["@nrwl/nx"],
"plugins": ["@nx"],
"overrides": [
{
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
"rules": {
"@nrwl/nx/enforce-module-boundaries": [
"@nx/enforce-module-boundaries": [
"error",
{
"enforceBuildableLibDependency": true,
Expand All @@ -23,12 +23,12 @@
},
{
"files": ["*.ts", "*.tsx"],
"extends": ["plugin:@nrwl/nx/typescript"],
"extends": ["plugin:@nx/typescript"],
"rules": {}
},
{
"files": ["*.js", "*.jsx"],
"extends": ["plugin:@nrwl/nx/javascript"],
"extends": ["plugin:@nx/javascript"],
"rules": {}
},
{
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ jobs:
- run: cd ./packages/web-component && npm version patch
- run: cd ./packages/ngx-web-component && npm version patch
- run: npx nx build web-component && npx nx bundle web-component && npx nx build ngx-web-component
# We have to do this now because nx is broken (see https://github.com/nrwl/nx/issues/19989)
- run: |
export VERSION=$(npm view node_modules/@readalongs/web-component version)
perl -i -lne 'if (/peerDependencies/) {print; print "\"\@readalongs/web-component\": \"'$VERSION'\","} else { print }' dist/packages/ngx-web-component/package.json
- run: |
cd dist/packages/web-component && npm publish --access=public
env:
Expand All @@ -43,7 +47,7 @@ jobs:
- name: Determine tag
id: determine_tag
run: |
echo "TAG_VERSION=$(npm view @readalongs/web-component version)" >> $GITHUB_OUTPUT
echo "TAG_VERSION=$(npm view node_modules/@readalongs/web-component version)" >> $GITHUB_OUTPUT
- name: Bump version and push tag
id: tag_version
uses: mathieudutour/[email protected]
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ packages/ngx-web-component/**/generated
dist
www
.nx
.python-version
.python-version
*~
2 changes: 2 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,5 @@ node_modules/
.angular/
www/
packages/ngx-web-component/**/generated

/.nx/cache
14 changes: 13 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,19 @@ The publication of the web component and its angular wrapper has been automated

WARNING: only use this process if the release workflow is broken.

To publish the web component, first you must belong to the [@readalongs organization](https://www.npmjs.com/org/readalongs) on NPM. Then, bump the version number in both `packages/web-component/package.json` and `packages/ngx-web-component/package.json`, run `npm install` to reflect that bump in `package-lock.json`, and build both the web component and angular wrapper:
To publish the web component, first you must belong to the
[@readalongs organization](https://www.npmjs.com/org/readalongs) on
NPM. Then, bump the version number in both
`packages/web-component/package.json` and
`packages/ngx-web-component/package.json` (note that Nx now
unfortunately no longer manages dependencies among projects properly,
so you must also update the version in `peerDependencies` for
`@readalongs/web-component` in
`packages/ngx-web-component/package.json` - if you find this to be
less than useful feel free to add your voice to [this bug
report](https://github.com/nrwl/nx/issues/19989)), run `npm install`
to reflect that bump in `package-lock.json`, and build both the web
component and angular wrapper:

npx nx build web-component
npx nx build ngx-web-component
Expand Down
2 changes: 1 addition & 1 deletion jest.config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { getJestProjects } from "@nrwl/jest";
import { getJestProjects } from "@nx/jest";

export default {
projects: getJestProjects(),
Expand Down
2 changes: 1 addition & 1 deletion jest.preset.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
const nxPreset = require("@nrwl/jest/preset").default;
const nxPreset = require("@nx/jest/preset").default;

module.exports = { ...nxPreset };
17 changes: 5 additions & 12 deletions nx.json
Original file line number Diff line number Diff line change
@@ -1,25 +1,17 @@
{
"tasksRunnerOptions": {
"default": {
"runner": "nx/tasks-runners/default",
"options": {
"cacheableOperations": []
}
}
},
"defaultBase": "main",
"generators": {
"@nrwl/angular:application": {
"@nx/angular:application": {
"style": "css",
"linter": "eslint",
"unitTestRunner": "jest",
"e2eTestRunner": "none"
},
"@nrwl/angular:library": {
"@nx/angular:library": {
"linter": "eslint",
"unitTestRunner": "jest"
},
"@nrwl/angular:component": {
"@nx/angular:component": {
"style": "css"
}
},
Expand All @@ -30,5 +22,6 @@
"lint": {
"inputs": ["default", "{workspaceRoot}/.eslintrc.json"]
}
}
},
"useInferencePlugins": false
}
Loading

0 comments on commit f247699

Please sign in to comment.