Skip to content
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 .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ jobs:
path: node-tools-dist/

- name: Build profiler-cli
run: yarn build-profiler-cli
run: yarn build-cli

- name: Upload profiler-cli artifact
if: matrix.os == 'ubuntu-latest'
Expand Down
8 changes: 4 additions & 4 deletions docs-developer/deploying.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,12 +121,12 @@ then land the version bump on `main` before publishing.
From the repository root:

```
yarn publish-profiler-cli
yarn publish-cli
```

[`scripts/publish-profiler-cli.mjs`](../scripts/publish-profiler-cli.mjs) will:

1. Run `yarn build-profiler-cli` to produce `profiler-cli/dist/profiler-cli.js` (a
1. Run `yarn build-cli` to produce `profiler-cli/dist/profiler-cli.js` (a
single self-contained bundle with no runtime dependencies).
2. Run `npm publish profiler-cli/`, picking `--tag next` when the version
contains `-` (e.g. `0.1.0-next.1`) and `--tag latest` otherwise.
Expand All @@ -139,10 +139,10 @@ Extra arguments are forwarded to `npm publish`. For example:

```
# Build and verify, but do not actually publish.
yarn publish-profiler-cli --dry-run
yarn publish-cli --dry-run

# Override the automatic dist-tag.
yarn publish-profiler-cli --tag alpha
yarn publish-cli --tag alpha
```

## Verify the release
Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@
"build-node-tools": "cross-env NODE_ENV=production node scripts/build-node-tools.mjs",
"build-profile-query": "cross-env NODE_ENV=production node scripts/build-profile-query.mjs",
"build-profile-query:quiet": "yarn build-profile-query",
"build-profiler-cli": "cross-env NODE_ENV=production node scripts/build-profiler-cli.mjs",
"build-profiler-cli:quiet": "yarn build-profiler-cli",
"publish-profiler-cli": "node scripts/publish-profiler-cli.mjs",
"build-cli": "cross-env NODE_ENV=production node scripts/build-profiler-cli.mjs",
"build-cli:quiet": "yarn build-cli",
"publish-cli": "node scripts/publish-profiler-cli.mjs",
"lint": "node bin/output-fixing-commands.js run-p lint-js lint-css fmt-check",
"lint-fix": "run-p lint-fix-js lint-fix-css fmt",
"lint-js": "node bin/output-fixing-commands.js eslint . --report-unused-disable-directives --cache --cache-strategy content",
Expand Down Expand Up @@ -56,7 +56,7 @@
"test-alex": "alex ./docs-* CODE_OF_CONDUCT.md CONTRIBUTING.md README.md",
"test-lockfile": "lockfile-lint --path yarn.lock --allowed-hosts yarn --validate-https",
"test-debug": "cross-env LC_ALL=C TZ=UTC NODE_ENV=test node --inspect-brk node_modules/.bin/jest --runInBand",
"test-cli": "yarn build-profiler-cli && node bin/output-fixing-commands.js cross-env LC_ALL=C TZ=UTC NODE_ENV=test JEST_PROJECTS=cli,cli-integration jest",
"test-cli": "yarn build-cli && node bin/output-fixing-commands.js cross-env LC_ALL=C TZ=UTC NODE_ENV=test JEST_PROJECTS=cli,cli-integration jest",
"postinstall": "patch-package"
},
"license": "MPL-2.0",
Expand Down
2 changes: 1 addition & 1 deletion profiler-cli/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ All test scripts automatically set `PROFILER_CLI_SESSION_DIR="./.profiler-cli-de
**Build:**

```bash
yarn build-profiler-cli # Creates ./dist/profiler-cli.js
yarn build-cli # Creates ./dist/profiler-cli.js
```

**Unit tests:**
Expand Down
2 changes: 1 addition & 1 deletion profiler-cli/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* profiler-cli session use <id> Switch the current session
*
* Build:
* yarn build-profiler-cli
* yarn build-cli
*
* Run:
* profiler-cli <command> (if profiler-cli is in PATH)
Expand Down
2 changes: 1 addition & 1 deletion scripts/publish-profiler-cli.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,5 @@ function run(cmd, args) {
}

run('yarn', ['test-all']);
run('yarn', ['build-profiler-cli']);
run('yarn', ['build-cli']);
run('npm', ['publish', 'profiler-cli/', ...tagArgs, ...forwardedArgs]);
4 changes: 2 additions & 2 deletions scripts/verify-profiler-cli-build.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const distPath = fileURLToPath(distUrl);
if (!existsSync(distUrl)) {
console.error(
`profiler-cli bundle not found at ${distPath}.\n` +
`Run 'yarn build-profiler-cli' from the repo root before publishing.`
`Run 'yarn build-cli' from the repo root before publishing.`
);
process.exit(1);
}
Expand All @@ -26,7 +26,7 @@ const needle = JSON.stringify(version);
if (!bundle.includes(needle)) {
console.error(
`profiler-cli bundle does not embed the current package.json version (${version}).\n` +
`The bundle is stale — rebuild with 'yarn build-profiler-cli' from the repo root.`
`The bundle is stale — rebuild with 'yarn build-cli' from the repo root.`
);
process.exit(1);
}
Expand Down
Loading