Skip to content

Commit

Permalink
chore(repo): dogfood nx release commands
Browse files Browse the repository at this point in the history
  • Loading branch information
JamesHenry committed Sep 20, 2023
1 parent d569252 commit 10c7838
Show file tree
Hide file tree
Showing 19 changed files with 415 additions and 1,639 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jest.debug.config.js
# Issues scraper creates these files, stored by github's cache
/scripts/issues-scraper/cached

# Lerna creates this
# We don't commit a CHANELGELOG.md file to the repo, we only create Github releases
CHANGELOG.md

# Next.js
Expand Down
4 changes: 1 addition & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,7 @@ Yarn Berry operates slightly differently than Yarn Classic. In order to publish
- localhost
```

- Run `pnpm nx-release --local` in Terminal 2 to publish next minor version. If this version already exists, you can
bump the minor version in `lerna.json` to toggle the next minor. The output will report the version of published
packages.
- Run `pnpm nx-release minor --local` in Terminal 2 to publish next minor version. The output will report the version of published packages.
- Go to your target folder (e.g. `cd ./tmp`) in Terminal 2
- Run `yarn dlx create-nx-workspace@123.4.5` in Terminal 2 (replace `123.4.5` with the version that got published).

Expand Down
10 changes: 0 additions & 10 deletions lerna.json

This file was deleted.

18 changes: 18 additions & 0 deletions nx.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,25 @@
}
]
},
"release": {
"groups": {
"npm": {
"projects": ["packages/*", "packages-legacy/*"],
"version": {
"generatorOptions": {
"packageRoot": "build/packages/{projectName}",
"currentVersionResolver": "registry"
}
}
}
}
},
"targetDefaults": {
"nx-release-publish": {
"options": {
"packageRoot": "build/packages/{projectName}"
}
},
"build": {
"dependsOn": ["build-base", "build-native"],
"inputs": [
Expand Down
40 changes: 17 additions & 23 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
"check-codeowners": "ts-node -P ./scripts/tsconfig.scripts.json ./scripts/check-codeowners.ts",
"nx-release": "ts-node -P ./scripts/tsconfig.release.json ./scripts/nx-release",
"prepublishOnly": "node ./scripts/update-package-group.js",
"version": "pnpm prettier lerna.json --write",
"local-registry": "nx local-registry @nx/nx-source",
"documentation": "ts-node -P scripts/tsconfig.scripts.json ./scripts/documentation/generators/main.ts && pnpm check-documentation-map",
"submit-plugin": "node ./scripts/submit-plugin.js",
Expand Down Expand Up @@ -65,20 +64,20 @@
"@ngrx/router-store": "~16.0.0",
"@ngrx/store": "~16.0.0",
"@nguniversal/builders": "~16.2.0",
"@nx/angular": "16.9.0-beta.2",
"@nx/cypress": "16.9.0-beta.2",
"@nx/devkit": "16.9.0-beta.2",
"@nx/esbuild": "16.9.0-beta.2",
"@nx/eslint-plugin": "16.9.0-beta.2",
"@nx/jest": "16.9.0-beta.2",
"@nx/js": "16.9.0-beta.2",
"@nx/linter": "16.9.0-beta.2",
"@nx/next": "16.9.0-beta.2",
"@nx/playwright": "16.9.0-beta.2",
"@nx/react": "16.9.0-beta.2",
"@nx/storybook": "16.9.0-beta.2",
"@nx/web": "16.9.0-beta.2",
"@nx/webpack": "16.9.0-beta.2",
"@nx/angular": "16.9.0-beta.3",
"@nx/cypress": "16.9.0-beta.3",
"@nx/devkit": "16.9.0-beta.3",
"@nx/esbuild": "16.9.0-beta.3",
"@nx/eslint-plugin": "16.9.0-beta.3",
"@nx/jest": "16.9.0-beta.3",
"@nx/js": "16.9.0-beta.3",
"@nx/linter": "16.9.0-beta.3",
"@nx/next": "16.9.0-beta.3",
"@nx/playwright": "16.9.0-beta.3",
"@nx/react": "16.9.0-beta.3",
"@nx/storybook": "16.9.0-beta.3",
"@nx/web": "16.9.0-beta.3",
"@nx/webpack": "16.9.0-beta.3",
"@parcel/watcher": "2.0.4",
"@phenomnomnominal/tsquery": "~5.0.1",
"@playwright/test": "^1.36.1",
Expand Down Expand Up @@ -209,7 +208,6 @@
"jsonc-eslint-parser": "^2.1.0",
"jsonc-parser": "3.2.0",
"kill-port": "^1.6.1",
"lerna": "6.6.2",
"less": "4.1.3",
"less-loader": "11.1.0",
"license-webpack-plugin": "^4.0.2",
Expand All @@ -229,8 +227,8 @@
"ng-packagr": "~16.2.0",
"node-fetch": "^2.6.7",
"npm-package-arg": "11.0.1",
"nx": "16.9.0-beta.2",
"nx-cloud": "16.4.0-beta.7",
"nx": "16.9.0-beta.3",
"nx-cloud": "16.4.0",
"octokit": "^2.0.14",
"open": "^8.4.0",
"openai": "~4.3.1",
Expand Down Expand Up @@ -371,10 +369,6 @@
"check-codeowners",
"documentation"
]
},
"pnpm": {
"patchedDependencies": {
"lerna@6.6.2": "patches/lerna@6.6.2.patch"
}
}
}

1 change: 1 addition & 0 deletions packages/nx/native-packages/darwin-arm64/project.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
1 change: 1 addition & 0 deletions packages/nx/native-packages/darwin-x64/project.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
1 change: 1 addition & 0 deletions packages/nx/native-packages/freebsd-x64/project.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
1 change: 1 addition & 0 deletions packages/nx/native-packages/linux-arm64-gnu/project.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
1 change: 1 addition & 0 deletions packages/nx/native-packages/linux-arm64-musl/project.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
1 change: 1 addition & 0 deletions packages/nx/native-packages/linux-x64-gnu/project.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
1 change: 1 addition & 0 deletions packages/nx/native-packages/linux-x64-musl/project.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
1 change: 1 addition & 0 deletions packages/nx/native-packages/win32-arm64-msvc/project.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
1 change: 1 addition & 0 deletions packages/nx/native-packages/win32-x64-msvc/project.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
6 changes: 5 additions & 1 deletion packages/nx/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,12 @@
}
}
},
"copy-native-package-directories": {
"command": "cp -R build/packages/nx/native-packages/* build/packages"
},
"artifacts": {
"command": "pnpm napi artifacts -c build/packages/nx/package.json -d ./artifacts --dist build/packages/nx/native-packages"
"dependsOn": ["copy-native-package-directories"],
"command": "pnpm napi artifacts -c build/packages/nx/package.json -d ./artifacts --dist build/packages"
},
"build-base": {
"executor": "@nx/js:tsc",
Expand Down
48 changes: 0 additions & 48 deletions patches/lerna@6.6.2.patch

This file was deleted.

Loading

0 comments on commit 10c7838

Please sign in to comment.