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: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ See the [Contributor Documentation](./docs) for help on:

- [`@metamask/apply-release-plan`](packages/apply-release-plan)
- [`@metamask/changeset-utils`](packages/changeset-utils)
- [`@metamask/create-release-branch`](packages/create-release-branch)

<!-- end package list -->

Expand All @@ -29,6 +30,7 @@ graph LR;
linkStyle default opacity:0.5
apply_release_plan(["@metamask/apply-release-plan"]);
changeset_utils(["@metamask/changeset-utils"]);
create_release_branch(["@metamask/create-release-branch"]);
```

<!-- end dependency graph -->
Expand Down
10 changes: 10 additions & 0 deletions knip.config.mts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,16 @@ const config: KnipConfig = {
'@changesets/cli',
],
},
'packages/create-release-branch': {
ignoreDependencies: [
// Imported only by the Vite-built UI (`src/ui/**`), which is not part
// of the dependency graph that knip analyzes for this workspace.
'react-markdown',
// Referenced only by the CSS `@import 'tailwindcss'` in the Vite UI
// styles, which knip cannot resolve.
'tailwindcss',
],
},
},
};

Expand Down
18 changes: 18 additions & 0 deletions oxlint.config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import base, { createConfig } from '@metamask/oxlint-config';
import browser from '@metamask/oxlint-config-browser';
import commonjs from '@metamask/oxlint-config-commonjs';
import nodejs from '@metamask/oxlint-config-nodejs';
import typescript from '@metamask/oxlint-config-typescript';
Expand Down Expand Up @@ -42,6 +43,8 @@ export default createConfig({
'packages/apply-release-plan/**',
'packages/*/vitest.config.mjs',
'scripts/create-package/package-template/vitest.config.mjs',
'packages/create-release-branch/**',
'!packages/create-release-branch/src/ui/**',
'yarn.config.cjs',
],
extends: [nodejs],
Expand All @@ -54,5 +57,20 @@ export default createConfig({
files: ['tests/**/*.ts'],
extends: [nodejs],
},
{
files: [
'packages/create-release-branch/**',
'!packages/create-release-branch/src/ui/**',
],
extends: [nodejs],
rules: {
// The `create-release-branch` CLI reads environment variables directly.
'node/no-process-env': 'off',
},
},
{
files: ['packages/create-release-branch/src/ui/**'],
extends: [typescript, browser],
},
],
});
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,11 @@
"files": [],
"type": "module",
"scripts": {
"build": "yarn tsc --build tsconfig.build.json --verbose",
"build": "yarn tsc --build tsconfig.build.json --verbose && yarn build:ui",
"build:clean": "yarn build:only-clean && yarn build",
"build:docs": "yarn build:only-clean && yarn build && yarn workspaces foreach --all --no-private --parallel --interlaced --verbose run build:docs",
"build:only-clean": "rimraf -g 'packages/*/dist' 'packages/*/tsconfig.build.tsbuildinfo' '.tsc-lint-cache' 'packages/*/.tsc-lint-cache'",
"build:ui": "yarn workspaces foreach --all --no-private --parallel --interlaced --verbose run build:ui",
"changelog:update": "yarn workspaces foreach --all --no-private --parallel --interlaced --verbose run changelog:update",
"changelog:validate": "yarn workspaces foreach --all --no-private --parallel --interlaced --verbose run changelog:validate",
"create-package": "tsx scripts/create-package",
Expand Down Expand Up @@ -46,6 +47,7 @@
"@lavamoat/preinstall-always-fail": "^2.1.0",
"@metamask/create-release-branch": "^4.2.2",
"@metamask/oxlint-config": "^0.1.1",
"@metamask/oxlint-config-browser": "^0.1.1",
"@metamask/oxlint-config-commonjs": "^0.1.1",
"@metamask/oxlint-config-nodejs": "^0.1.1",
"@metamask/oxlint-config-typescript": "^0.1.1",
Expand Down
Comment thread
Mrtenz marked this conversation as resolved.
Original file line number Diff line number Diff line change
Expand Up @@ -201,17 +201,19 @@ describe('fs', () => {

await ensureDirectoryPathExists(directoryPath);

await expect(
fs.promises.readdir(path.join(sandbox.directoryPath, 'foo')),
).resolves.toBeDefined();
await expect(
fs.promises.readdir(path.join(sandbox.directoryPath, 'foo', 'bar')),
).resolves.toBeDefined();
await expect(
fs.promises.readdir(
expect(
await fs.promises.readdir(path.join(sandbox.directoryPath, 'foo')),
).toBeDefined();
expect(
await fs.promises.readdir(
path.join(sandbox.directoryPath, 'foo', 'bar'),
),
).toBeDefined();
expect(
await fs.promises.readdir(
path.join(sandbox.directoryPath, 'foo', 'bar', 'baz'),
),
).resolves.toBeDefined();
).toBeDefined();
});
});

Expand All @@ -229,9 +231,7 @@ describe('fs', () => {
path.join(sandbox.directoryPath, 'foo', 'bar', 'baz'),
);

await expect(
ensureDirectoryPathExists(directoryPath),
).resolves.toBeUndefined();
expect(await ensureDirectoryPathExists(directoryPath)).toBeUndefined();
});
});

Expand Down
3 changes: 3 additions & 0 deletions tsconfig.build.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@
},
{
"path": "./packages/changeset-utils/tsconfig.build.json"
},
{
"path": "./packages/create-release-branch/tsconfig.build.json"
}
],
"files": [],
Expand Down
3 changes: 3 additions & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@
},
{
"path": "./packages/changeset-utils"
},
{
"path": "./packages/create-release-branch"
}
],
"files": [],
Expand Down
3 changes: 3 additions & 0 deletions tsconfig.lint.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@
},
{
"path": "./packages/changeset-utils/tsconfig.lint.json"
},
{
"path": "./packages/create-release-branch/tsconfig.lint.json"
}
]
}
Loading
Loading