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
3 changes: 3 additions & 0 deletions .github/workflows/lint-build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,9 @@ jobs:
# Full history so `changelog:validate` can find the merge base with the
# base branch to detect which packages are being released.
fetch-depth: 0
# The changelog scripts run the `auto-changelog` CLI from its workspace.
- name: Build `auto-changelog`
run: yarn workspace @metamask/auto-changelog run build
- run: yarn workspace "$PACKAGE_NAME" changelog:validate
env:
PACKAGE_NAME: ${{ matrix.package-name }}
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/update-changelogs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,11 @@ jobs:
git commit -m "[Temporary] Add changelogs from current pull request"
shell: bash

# The changelog scripts run the `auto-changelog` CLI from its workspace.
- name: Build `auto-changelog`
run: yarn workspace @metamask/auto-changelog run build
shell: bash

- name: Ensure required dependency bump entries exist across all changelogs
id: update-changelogs
env:
Expand Down
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ See the [Contributor Documentation](./docs) for help on:
<!-- start package list -->

- [`@metamask/apply-release-plan`](packages/apply-release-plan)
- [`@metamask/auto-changelog`](packages/auto-changelog)
- [`@metamask/changesets-changelog`](packages/changesets-changelog)
- [`@metamask/changesets-lint`](packages/changesets-lint)
- [`@metamask/changesets-utils`](packages/changesets-utils)
Expand All @@ -31,12 +32,18 @@ See the [Contributor Documentation](./docs) for help on:
graph LR;
linkStyle default opacity:0.5
apply_release_plan(["@metamask/apply-release-plan"]);
auto_changelog(["@metamask/auto-changelog"]);
changesets_changelog(["@metamask/changesets-changelog"]);
changesets_lint(["@metamask/changesets-lint"]);
changesets_utils(["@metamask/changesets-utils"]);
create_release_branch(["@metamask/create-release-branch"]);
apply_release_plan --> auto_changelog;
changesets_changelog --> changesets_utils;
changesets_changelog --> auto_changelog;
changesets_lint --> changesets_utils;
changesets_lint --> auto_changelog;
changesets_utils --> auto_changelog;
create_release_branch --> auto_changelog;
```

<!-- end dependency graph -->
Expand Down
11 changes: 11 additions & 0 deletions oxlint.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,17 @@ export default createConfig({
'node/no-process-env': 'off',
},
},
{
files: ['packages/auto-changelog/src/cli.ts'],
rules: {
// The published `bin` is the built `dist/cli.js`, which keeps this
// shebang. Map the source to it so the rule checks the right file.
'n/hashbang': [
'error',
{ convertPath: { 'src/**/*.ts': ['^src/(.+)\\.ts$', 'dist/$1.js'] } },
],
},
},
{
files: ['packages/create-release-branch/src/ui/**'],
extends: [typescript, browser],
Expand Down
2 changes: 1 addition & 1 deletion packages/apply-release-plan/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
"devDependencies": {
"@changesets/cli": "3.0.3",
"@manypkg/get-packages": "^3.1.0",
"@metamask/auto-changelog": "^6.1.0",
"@metamask/auto-changelog": "^6.2.1",
"@types/node": "^22.13.14",
"@types/semver": "^7",
"@typescript/native": "npm:typescript@^7.0.2",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,15 @@ This package has a CLI (`auto-changelog`), and an API.

## Installation

`yarn add --dev @metamask/auto-changelog`
```sh
yarn add @metamask/auto-changelog --dev
```

or
or:

`npm install --save-dev @metamask/auto-changelog`
```sh
npm install @metamask/auto-changelog --save-dev
```

## CLI Usage

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
"since-latest-release": "../../scripts/since-latest-release.sh",
"test": "vitest",
"test:clean": "vitest --clearCache",
"test:package": "attw --pack",
"test:package": "attw --pack --profile esm-only",
"test:verbose": "vitest --reporter=verbose",
"test:watch": "vitest --watch"
},
Expand All @@ -55,11 +55,12 @@
"yargs": "^17.7.2"
},
"devDependencies": {
"@arethetypeswrong/cli": "^0.15.3",
"@arethetypeswrong/cli": "^0.18.5",
"@types/diff": "^5.0.0",
"@types/node": "^22.18.0",
"@types/node": "^22.13.14",
"@types/semver": "^7",
"@types/yargs": "^17.0.33",
"@typescript/native": "npm:typescript@^7.0.2",
"@vitest/coverage-istanbul": "^5.0.1",
"nock": "^14.0.17",
"outdent": "^0.8.0",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#!/usr/bin/env node
/* oxlint-disable n/hashbang -- TypeScript preserves this shebang in the built CLI. */

import { promises as fs, constants as fsConstants } from 'fs';
import path from 'path';
Expand Down
2 changes: 1 addition & 1 deletion packages/changesets-changelog/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
"execa": "^8.0.1"
},
"devDependencies": {
"@metamask/auto-changelog": "^6.1.0",
"@metamask/auto-changelog": "^6.2.1",
"@types/node": "^22.13.14",
"@typescript/native": "npm:typescript@^7.0.2",
"@vitest/coverage-istanbul": "^5.0.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/changesets-lint/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
"yaml": "^2.2.2"
},
"devDependencies": {
"@metamask/auto-changelog": "^6.1.0",
"@metamask/auto-changelog": "^6.2.1",
"@types/node": "^22.13.14",
"@typescript/native": "npm:typescript@^7.0.2",
"@vitest/coverage-istanbul": "^5.0.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/changesets-utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
"@changesets/types": "^7.0.0"
},
"devDependencies": {
"@metamask/auto-changelog": "^6.1.0",
"@metamask/auto-changelog": "^6.2.1",
"@types/node": "^22.13.14",
"@typescript/native": "npm:typescript@^7.0.2",
"@vitest/coverage-istanbul": "^5.0.1",
Expand Down
4 changes: 4 additions & 0 deletions packages/create-release-branch/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

- This package was migrated from [`MetaMask/create-release-branch`](https://github.com/MetaMask/create-release-branch). See [the original changelog](https://github.com/MetaMask/create-release-branch/blob/v4.2.2/CHANGELOG.md) for changes prior to the migration.

### Changed

- Bump `@metamask/auto-changelog` from `^6.1.0` to `^6.2.1` ([#103](https://github.com/MetaMask/release-tools/pull/103))

[Unreleased]: https://github.com/MetaMask/release-tools/
2 changes: 1 addition & 1 deletion packages/create-release-branch/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
},
"dependencies": {
"@metamask/action-utils": "^2.0.0",
"@metamask/auto-changelog": "^6.1.0",
"@metamask/auto-changelog": "^6.2.1",
"@metamask/utils": "^11.12.0",
"debug": "^4.3.4",
"execa": "^8.0.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ const ROOT_DIR = path.resolve(__dirname, '../../..');
const REPOSITORY_ROOT = path.resolve(ROOT_DIR, '../..');
export const TOOL_EXECUTABLE_PATH = path.join(ROOT_DIR, 'src', 'cli.ts');

// The tool runs from a temporary repository, so `tsx` would not find the
// package's `tsconfig.json` on its own. Its `paths` resolve sibling workspace
// packages to their source, so the tool runs without building them first.
export const TSCONFIG_PATH = path.join(ROOT_DIR, 'tsconfig.json');

export const TSX_PATH = path.join(
REPOSITORY_ROOT,
'node_modules',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import fs from 'fs';
import path from 'path';
import YAML from 'yaml';

import { TOOL_EXECUTABLE_PATH, TSX_PATH } from './constants.js';
import { TOOL_EXECUTABLE_PATH, TSCONFIG_PATH, TSX_PATH } from './constants.js';
import Environment, {
EnvironmentOptions,
PackageSpecification,
Expand Down Expand Up @@ -127,6 +127,8 @@ cat "${releaseSpecificationPath}" > "$1"
await fs.promises.chmod(releaseSpecificationEditorPath, 0o777);

const args = [
'--tsconfig',
TSCONFIG_PATH,
TOOL_EXECUTABLE_PATH,
'--project-directory',
this.localRepo.getWorkingDirectoryPath(),
Expand Down
1 change: 1 addition & 0 deletions packages/create-release-branch/tsconfig.build.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"lib": ["ES2023", "DOM", "DOM.Iterable"],
"types": ["node"]
},
"references": [{ "path": "../auto-changelog/tsconfig.build.json" }],
"include": ["./src"],
"exclude": ["**/*.test.ts", "./src/ui/**"]
}
1 change: 1 addition & 0 deletions packages/create-release-branch/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@
"lib": ["ES2023", "DOM", "DOM.Iterable"],
"types": ["node", "react", "react-dom", "vite/client"]
},
"references": [{ "path": "../auto-changelog" }],
"include": ["./src", "./tests"]
}
3 changes: 2 additions & 1 deletion packages/create-release-branch/tsconfig.lint.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@
"compilerOptions": {
"outDir": "./.tsc-lint-cache",
"tsBuildInfoFile": "./.tsc-lint-cache/tsconfig.tsbuildinfo"
}
},
"references": [{ "path": "../auto-changelog/tsconfig.lint.json" }]
}
2 changes: 1 addition & 1 deletion scripts/create-package/package-template/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
"test:watch": "vitest --watch"
},
"devDependencies": {
"@metamask/auto-changelog": "^6.1.0",
"@metamask/auto-changelog": "^6.2.1",
"@typescript/native": "npm:typescript@^7.0.2",
"@vitest/coverage-istanbul": "^5.0.1",
"rimraf": "^5.0.5",
Expand Down
3 changes: 3 additions & 0 deletions tsconfig.build.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
{
"path": "./packages/apply-release-plan/tsconfig.build.json"
},
{
"path": "./packages/auto-changelog/tsconfig.build.json"
},
{
"path": "./packages/changesets-changelog/tsconfig.build.json"
},
Expand Down
3 changes: 3 additions & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@
{
"path": "./packages/apply-release-plan"
},
{
"path": "./packages/auto-changelog"
},
{
"path": "./packages/changesets-changelog"
},
Expand Down
3 changes: 3 additions & 0 deletions tsconfig.lint.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@
{
"path": "./packages/apply-release-plan/tsconfig.lint.json"
},
{
"path": "./packages/auto-changelog/tsconfig.lint.json"
},
{
"path": "./packages/changesets-changelog/tsconfig.lint.json"
},
Expand Down
Loading
Loading