Skip to content
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

chore(repo): dogfood nx release commands #19237

Merged
merged 3 commits into from
Sep 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 [email protected]` in Terminal 2 (replace `123.4.5` with the version that got published).

Expand Down
3 changes: 3 additions & 0 deletions e2e/utils/global-setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ import { existsSync, removeSync } from 'fs-extra';
import { Config } from '@jest/types';
import * as isCI from 'is-ci';

const LARGE_BUFFER = 1024 * 1000000;

export default async function (globalConfig: Config.ConfigGlobals) {
const isVerbose: boolean =
process.env.NX_VERBOSE_LOGGING === 'true' || !!globalConfig.verbose;
Expand All @@ -33,6 +35,7 @@ export default async function (globalConfig: Config.ConfigGlobals) {
await new Promise<void>((res, rej) => {
const publishProcess = exec(`pnpm nx-release --local ${publishVersion}`, {
env: process.env,
maxBuffer: LARGE_BUFFER,
});
let logs = Buffer.from('');
if (isVerbose) {
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
8 changes: 1 addition & 7 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 @@ -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 Down Expand Up @@ -371,10 +369,6 @@
"check-codeowners",
"documentation"
]
},
"pnpm": {
"patchedDependencies": {
"[email protected]": "patches/[email protected]"
}
}
}

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 @@
{}
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 @@
{}
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/[email protected]

This file was deleted.

Loading