Skip to content

Commit

Permalink
chore(repo): dogfood nx release commands (#19237)
Browse files Browse the repository at this point in the history
  • Loading branch information
JamesHenry authored Sep 21, 2023
1 parent d1310e3 commit 6327fab
Show file tree
Hide file tree
Showing 20 changed files with 211 additions and 1,433 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 [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 @@
{}
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/[email protected]

This file was deleted.

Loading

1 comment on commit 6327fab

@vercel
Copy link

@vercel vercel bot commented on 6327fab Sep 21, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

nx-dev – ./

nx-dev-git-master-nrwl.vercel.app
nx-five.vercel.app
nx-dev-nrwl.vercel.app
nx.dev

Please sign in to comment.