Skip to content

Commit

Permalink
feat: add support for Nx 20
Browse files Browse the repository at this point in the history
  • Loading branch information
edbzn committed Dec 3, 2024
1 parent 521ea8c commit d73cf9d
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 9 deletions.
2 changes: 1 addition & 1 deletion packages/semver/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"url": "https://github.com/jscutlery/semver"
},
"peerDependencies": {
"@nx/devkit": "^18.0.0 || ^19.0.0"
"@nx/devkit": "^18.0.0 || ^19.0.0 || ^20.0.0"
},
"dependencies": {
"chalk": "4.1.2",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,11 @@
exports[`@jscutlery/semver @jscutlery/semver:migrate-nx-release should generate CHANGELOG.md: b-0.3.0 1`] = `
"## 0.3.0 (yyyy-mm-dd)
### 🚀 Features
- **b:** 🚀 new feature
### ❤️ Thank You
### ❤️ Thank You
- Test Bot
Expand Down
5 changes: 3 additions & 2 deletions packages/semver/src/executors/version/testing.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,9 @@ export function setupTestingWorkspace(): TestingWorkspace {
},

generateLib(name: string, options = '') {
const commonArgs = `--unitTestRunner=none --linter=none --bundler=none --minimal --skipFormat --projectNameAndRootFormat=as-provided`;
const commonArgs = `--unitTestRunner=none --linter=none --bundler=tsc --minimal --skipFormat`;
this.runNx(
`g @nx/js:lib ${name} --directory=libs/${name} ${commonArgs} ${options}`,
`g @nx/js:lib --directory=libs/${name} ${commonArgs} ${options}`,
);
},

Expand Down Expand Up @@ -167,6 +167,7 @@ export function createFakeContext({
nodes: {},
dependencies: {},
},
nxJsonConfiguration: {},
} satisfies ExecutorContext;
}

Expand Down
3 changes: 1 addition & 2 deletions packages/semver/src/executors/version/utils/post-target.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,8 @@ export function runPostTargets({
return concat(
...postTargets.map((postTargetSchema) =>
defer(async () => {
// TODO: deprecate specifying the project name in the post target schema.
const target = postTargetSchema.includes(':')
? parseTargetString(postTargetSchema)
? parseTargetString(postTargetSchema, context.projectGraph)
: parseTargetString(postTargetSchema, context);

_checkTargetExist(target, context);
Expand Down
2 changes: 1 addition & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2115,7 +2115,7 @@ __metadata:
inquirer: "npm:8.2.6"
rxjs: "npm:7.8.1"
peerDependencies:
"@nx/devkit": ^18.0.0 || ^19.0.0
"@nx/devkit": ^18.0.0 || ^19.0.0 || ^20.0.0
languageName: unknown
linkType: soft

Expand Down

0 comments on commit d73cf9d

Please sign in to comment.