@mui/internal-code-infra 0.0.4-canary.3 → 0.0.4-canary.31

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (69) hide show
  1. package/README.md +19 -8
  2. package/build/babel-config.d.mts +11 -3
  3. package/build/brokenLinksChecker/crawlWorker.d.mts +1 -0
  4. package/build/brokenLinksChecker/index.d.mts +35 -2
  5. package/build/changelog/types.d.ts +1 -1
  6. package/build/cli/cmdArgosPush.d.mts +2 -2
  7. package/build/cli/cmdBuild.d.mts +2 -2
  8. package/build/cli/cmdCopyFiles.d.mts +2 -2
  9. package/build/cli/cmdExtractErrorCodes.d.mts +2 -2
  10. package/build/cli/cmdGenerateChangelog.d.mts +2 -2
  11. package/build/cli/cmdGithubAuth.d.mts +2 -2
  12. package/build/cli/cmdListWorkspaces.d.mts +4 -2
  13. package/build/cli/cmdNetlifyIgnore.d.mts +2 -2
  14. package/build/cli/cmdPublish.d.mts +4 -2
  15. package/build/cli/cmdPublishCanary.d.mts +3 -2
  16. package/build/cli/cmdPublishNewPackage.d.mts +4 -2
  17. package/build/cli/cmdSetVersionOverrides.d.mts +2 -2
  18. package/build/cli/cmdVale.d.mts +46 -0
  19. package/build/cli/cmdValidateBuiltTypes.d.mts +2 -2
  20. package/build/eslint/mui/rules/disallow-react-api-in-server-components.d.mts +2 -2
  21. package/build/eslint/mui/rules/docgen-ignore-before-comment.d.mts +2 -2
  22. package/build/eslint/mui/rules/no-restricted-resolved-imports.d.mts +2 -2
  23. package/build/markdownlint/duplicate-h1.d.mts +1 -1
  24. package/build/markdownlint/git-diff.d.mts +1 -1
  25. package/build/markdownlint/index.d.mts +1 -1
  26. package/build/markdownlint/straight-quotes.d.mts +1 -1
  27. package/build/markdownlint/table-alignment.d.mts +1 -1
  28. package/build/markdownlint/terminal-language.d.mts +1 -1
  29. package/build/utils/build.d.mts +3 -3
  30. package/build/utils/github.d.mts +1 -1
  31. package/build/utils/pnpm.d.mts +68 -2
  32. package/build/utils/testUtils.d.mts +7 -0
  33. package/package.json +38 -31
  34. package/src/babel-config.mjs +9 -3
  35. package/src/brokenLinksChecker/__fixtures__/static-site/index.html +1 -0
  36. package/src/brokenLinksChecker/__fixtures__/static-site/invalid-html.html +15 -0
  37. package/src/brokenLinksChecker/crawlWorker.mjs +173 -0
  38. package/src/brokenLinksChecker/index.mjs +177 -164
  39. package/src/brokenLinksChecker/index.test.ts +55 -13
  40. package/src/build-env.d.ts +13 -0
  41. package/src/changelog/fetchChangelogs.mjs +6 -2
  42. package/src/changelog/types.ts +1 -1
  43. package/src/cli/cmdListWorkspaces.mjs +9 -2
  44. package/src/cli/cmdNetlifyIgnore.mjs +4 -88
  45. package/src/cli/cmdPublish.mjs +51 -14
  46. package/src/cli/cmdPublishCanary.mjs +139 -107
  47. package/src/cli/cmdPublishNewPackage.mjs +27 -6
  48. package/src/cli/cmdVale.mjs +513 -0
  49. package/src/cli/cmdVale.test.mjs +644 -0
  50. package/src/cli/index.mjs +2 -0
  51. package/src/eslint/baseConfig.mjs +2 -1
  52. package/src/eslint/docsConfig.mjs +2 -1
  53. package/src/eslint/jsonConfig.mjs +2 -1
  54. package/src/eslint/mui/config.mjs +11 -1
  55. package/src/eslint/testConfig.mjs +2 -1
  56. package/src/estree-typescript.d.ts +1 -1
  57. package/src/untyped-plugins.d.ts +11 -11
  58. package/src/utils/build.test.mjs +546 -575
  59. package/src/utils/pnpm.mjs +192 -3
  60. package/src/utils/pnpm.test.mjs +580 -0
  61. package/src/utils/testUtils.mjs +18 -0
  62. package/src/utils/typescript.test.mjs +249 -272
  63. package/vale/.vale.ini +1 -0
  64. package/vale/styles/MUI/CorrectReferenceAllCases.yml +43 -0
  65. package/vale/styles/MUI/CorrectRererenceCased.yml +14 -0
  66. package/vale/styles/MUI/GoogleLatin.yml +11 -0
  67. package/vale/styles/MUI/MuiBrandName.yml +22 -0
  68. package/vale/styles/MUI/NoBritish.yml +112 -0
  69. package/vale/styles/MUI/NoCompanyName.yml +17 -0
package/README.md CHANGED
@@ -35,24 +35,35 @@ This is stored in the `docs` top-level directory.
35
35
 
36
36
  ### Adding and publishing new packages
37
37
 
38
- Whenever news packages are added to the repo (that will get published to npm) or a private package is turned into a public one, follow the below steps before invoking the publish workflow of the previous section.
38
+ Whenever new packages are added to the repo (that will get published to npm) or a private package is turned into a public one, follow the below steps before invoking the publish workflow of the previous section.
39
39
 
40
- 1. Goto your repo's code base on your system, open terminal and run:
40
+ 1. Go to your repo's code base on your system, then log in to npm using
41
+
42
+ ```bash
43
+ npm login
44
+ ```
45
+
46
+ 2. Once logged-in, open terminal and run:
41
47
 
42
48
  ```bash
43
49
  pnpm code-infra publish-new-package
44
50
  ```
45
51
 
46
52
  This command detects the new public packages in the repo and asks for your confirmation before publishing them to the npm registry. Add the `--dryRun` flag to skip the actual publishing.
53
+ If publishing fails with npm asking for `otp`, run the command again with 6 digit auth code from your authenticator app where you've added npm; Google Authenticator, Authy or similar:
54
+
55
+ ```bash
56
+ pnpm code-infra publish-new-package --otp=123456
57
+ ```
47
58
 
48
- 2. Goto the settings link for each packages, ie, https://www.npmjs.com/package/<pkg-name>/access , and setup `Trusted Publisher`.
49
- 3. In `Select your publisher` step in the above link, click on the `Github Actions` button to configure Github actions based trusted publishing.
50
- 4. Fill in the details of the repo -
59
+ 3. Go to the settings link for each package, e.g., `https://www.npmjs.com/package/<pkg-name>/access`, and setup `Trusted Publisher`.
60
+ 4. In the `Select your publisher` step in the above link, click on the `GitHub Actions` button to configure GitHub Actions-based trusted publishing.
61
+ 5. Fill in the details of the repo -
51
62
  1. `Organization or user` as `mui`,
52
63
  2. `Repository` as per the new package
53
64
  3. `Workflow filename*` should be `publish.yml`
54
- 4. `Environment name` should be `npm-publish`
55
- 5. In the `Publishing access` section, toggle the recommended option of `Require two-factor authentication and disallow tokens`.
56
- 6. Finally, save the changes by clicking on `Update Package Settings` button.
65
+ 4. `Environment name` should be `npm-publish` or `npm-publish-internal` based on whether the package is user facing package or internal package respectively.
66
+ 6. In the `Publishing access` section, toggle the recommended option of `Require two-factor authentication and disallow tokens`.
67
+ 7. Finally, save the changes by clicking on `Update Package Settings` button.
57
68
 
58
69
  After following these steps, the `Publish` workflow can be invoked again.
@@ -1,3 +1,7 @@
1
+ export type ReactCompilationMode = 'annotation' | 'syntax' | 'infer' | 'all';
2
+ /**
3
+ * @typedef {'annotation' | 'syntax' | 'infer' | 'all'} ReactCompilationMode
4
+ */
1
5
  /**
2
6
  * @param {Object} param0
3
7
  * @param {boolean} [param0.debug]
@@ -8,10 +12,11 @@
8
12
  * @param {string | null} param0.outExtension - Specify the output file extension.
9
13
  * @param {string} param0.runtimeVersion
10
14
  * @param {string} [param0.reactCompilerReactVersion]
11
- * @param {string} [param0.reactCompilerMode]
15
+ * @param {ReactCompilationMode} [param0.reactCompilerMode]
16
+ * @param {{ allowedCallees?: Record<string, string[]> }} [param0.displayName] - Options for the display name plugin.
12
17
  * @returns {import('@babel/core').TransformOptions} The base Babel configuration.
13
18
  */
14
- export declare function getBaseConfig({ debug, optimizeClsx, removePropTypes, noResolveImports, bundle, runtimeVersion, outExtension, reactCompilerReactVersion, reactCompilerMode }: {
19
+ export declare function getBaseConfig({ debug, optimizeClsx, removePropTypes, noResolveImports, bundle, runtimeVersion, outExtension, reactCompilerReactVersion, reactCompilerMode, displayName }: {
15
20
  debug?: boolean;
16
21
  optimizeClsx?: boolean;
17
22
  removePropTypes?: boolean;
@@ -20,7 +25,10 @@ export declare function getBaseConfig({ debug, optimizeClsx, removePropTypes, no
20
25
  outExtension: string | null;
21
26
  runtimeVersion: string;
22
27
  reactCompilerReactVersion?: string;
23
- reactCompilerMode?: string;
28
+ reactCompilerMode?: ReactCompilationMode;
29
+ displayName?: {
30
+ allowedCallees?: Record<string, string[]>;
31
+ };
24
32
  }): import('@babel/core').TransformOptions;
25
33
  export type Options = {
26
34
  bundle?: 'esm' | 'cjs';
@@ -0,0 +1 @@
1
+ export {};
@@ -2,6 +2,24 @@ export type LinkStructure = Map<string, Set<string>>;
2
2
  export type SerializedLinkStructure = {
3
3
  targets: Record<string, string[]>;
4
4
  };
5
+ export type CrawlWorkerInput = {
6
+ pageUrl: string;
7
+ options: ResolvedCrawlOptions;
8
+ };
9
+ export type CrawlWorkerPageData = {
10
+ url: string;
11
+ status: number;
12
+ targets: string[];
13
+ contentType: string;
14
+ };
15
+ export type CrawlWorkerOutput = {
16
+ pageData: CrawlWorkerPageData;
17
+ links: Link[];
18
+ htmlValidateResults: {
19
+ pageUrl: string;
20
+ results: import('html-validate').Result[];
21
+ } | null;
22
+ };
5
23
  export type PageData = {
6
24
  url: string;
7
25
  status: number;
@@ -36,15 +54,30 @@ export type CrawlOptions = {
36
54
  concurrency?: number;
37
55
  seedUrls?: string[];
38
56
  ignores?: IgnoreRule[];
57
+ htmlValidate?: boolean | import('html-validate').ConfigData;
39
58
  };
40
- export type ResolvedCrawlOptions = Omit<Required<CrawlOptions>, 'ignores'> & {
59
+ export type ResolvedCrawlOptions = Omit<Required<CrawlOptions>, 'ignores' | 'htmlValidate'> & {
41
60
  ignores: NormalizedIgnoreRule[];
61
+ htmlValidate: import('html-validate').ConfigData | null;
42
62
  };
43
- export type Issue = {
63
+ export type BrokenLinkIssue = {
44
64
  type: 'broken-link' | 'broken-target';
45
65
  message: string;
46
66
  link: Link;
47
67
  };
68
+ export type HtmlValidateIssue = {
69
+ type: 'html-validate';
70
+ message: string;
71
+ pageUrl: string;
72
+ ruleId: string;
73
+ severity: number;
74
+ location: {
75
+ line: number;
76
+ column: number;
77
+ };
78
+ selector: string | null;
79
+ };
80
+ export type Issue = BrokenLinkIssue | HtmlValidateIssue;
48
81
  export type CrawlResult = {
49
82
  links: Set<Link>;
50
83
  pages: Map<string, PageData>;
@@ -212,7 +212,7 @@ export interface IntroConfig {
212
212
  * - {{teamCount}}: Number of team members
213
213
  * - {{communityCount}}: Number of community contributors
214
214
  *
215
- * Example: "We'd like to extend a big thank you to the {{contributorCount}} contributors who made this release possible"
215
+ * Example: "A big thanks to the {{contributorCount}} contributors who made this release possible."
216
216
  *
217
217
  * Set to `false` or omit to disable the thank you message.
218
218
  */
@@ -8,5 +8,5 @@ export type Args = {
8
8
  * @property {boolean} [verbose] - Run with verbose logging
9
9
  * @property {string} folder - Screenshots folder path
10
10
  */
11
- declare const _default: import("yargs").CommandModule<{}, Args>;
12
- export default /** @type {import('yargs').CommandModule<{}, Args>} */ _default;
11
+ declare const _default: import('yargs').CommandModule<{}, Args>;
12
+ export default _default;
@@ -14,5 +14,5 @@ export type Args = {
14
14
  tsgo?: boolean;
15
15
  flat?: boolean;
16
16
  };
17
- declare const _default: import("yargs").CommandModule<{}, Args>;
18
- export default /** @type {import('yargs').CommandModule<{}, Args>} */ _default;
17
+ declare const _default: import('yargs').CommandModule<{}, Args>;
18
+ export default _default;
@@ -4,5 +4,5 @@ export type Args = {
4
4
  glob?: string[];
5
5
  files?: string[];
6
6
  };
7
- declare const _default: import("yargs").CommandModule<{}, Args>;
8
- export default /** @type {import('yargs').CommandModule<{}, Args>} */ _default;
7
+ declare const _default: import('yargs').CommandModule<{}, Args>;
8
+ export default _default;
@@ -2,5 +2,5 @@ export type Args = import('../utils/extractErrorCodes.mjs').Args;
2
2
  /**
3
3
  * @typedef {import('../utils/extractErrorCodes.mjs').Args} Args
4
4
  */
5
- declare const _default: import("yargs").CommandModule<{}, import("../utils/extractErrorCodes.mjs").Args>;
6
- export default /** @type {import('yargs').CommandModule<{}, Args>} */ _default;
5
+ declare const _default: import('yargs').CommandModule<{}, Args>;
6
+ export default _default;
@@ -13,5 +13,5 @@ export type Args = {
13
13
  * @property {string} releaseVersion The version number for the new release
14
14
  * @property {string} cwd The current working directory to run the command in
15
15
  */
16
- declare const _default: import("yargs").CommandModule<{}, Args>;
17
- export default /** @type {import('yargs').CommandModule<{}, Args>} */ _default;
16
+ declare const _default: import('yargs').CommandModule<{}, Args>;
17
+ export default _default;
@@ -7,5 +7,5 @@ export type Args = {
7
7
  * @property {boolean} authorize
8
8
  * @property {boolean} clear
9
9
  */
10
- declare const _default: import("yargs").CommandModule<{}, Args>;
11
- export default /** @type {import('yargs').CommandModule<{}, Args>} */ _default;
10
+ declare const _default: import('yargs').CommandModule<{}, Args>;
11
+ export default _default;
@@ -4,12 +4,14 @@ export type Args = {
4
4
  publicOnly?: boolean;
5
5
  output?: 'json' | 'path' | 'name' | 'publish-dir';
6
6
  sinceRef?: string;
7
+ filter?: string[];
7
8
  };
8
9
  /**
9
10
  * @typedef {Object} Args
10
11
  * @property {boolean} [publicOnly] - Whether to filter to only public packages
11
12
  * @property {'json'|'path'|'name'|'publish-dir'} [output] - Output format (name, path, or json)
12
13
  * @property {string} [sinceRef] - Git reference to filter changes since
14
+ * @property {string[]} [filter] - Same as filtering packages with --filter in pnpm. Only include packages matching the filter. See https://pnpm.io/filtering.
13
15
  */
14
- declare const _default: import("yargs").CommandModule<{}, Args>;
15
- export default /** @type {import('yargs').CommandModule<{}, Args>} */ _default;
16
+ declare const _default: import('yargs').CommandModule<{}, Args>;
17
+ export default _default;
@@ -3,5 +3,5 @@ export type Args = {
3
3
  workspaces: string[];
4
4
  check?: boolean;
5
5
  };
6
- declare const _default: import("yargs").CommandModule<{}, Args>;
7
- export default /** @type {import('yargs').CommandModule<{}, Args>} */ _default;
6
+ declare const _default: import('yargs').CommandModule<{}, Args>;
7
+ export default _default;
@@ -1,12 +1,14 @@
1
1
  #!/usr/bin/env node
2
2
  export type PublicPackage = import('../utils/pnpm.mjs').PublicPackage;
3
3
  export type PublishOptions = import('../utils/pnpm.mjs').PublishOptions;
4
+ export type PublishSummaryEntry = import('../utils/pnpm.mjs').PublishSummaryEntry;
4
5
  export type Args = {
5
6
  dry-run: boolean;
6
7
  github-release: boolean;
7
8
  tag: string;
8
9
  ci: boolean;
9
10
  sha?: string;
11
+ filter?: string[];
10
12
  };
11
- declare const _default: import("yargs").CommandModule<{}, Args>;
12
- export default /** @type {import('yargs').CommandModule<{}, Args>} */ _default;
13
+ declare const _default: import('yargs').CommandModule<{}, Args>;
14
+ export default _default;
@@ -5,11 +5,12 @@ export type PublishOptions = import('../utils/pnpm.mjs').PublishOptions;
5
5
  export type Args = {
6
6
  dryRun?: boolean;
7
7
  githubRelease?: boolean;
8
+ filter?: string[];
8
9
  };
9
10
  export type Commit = {
10
11
  sha: string;
11
12
  message: string;
12
13
  author: string;
13
14
  };
14
- declare const _default: import("yargs").CommandModule<{}, Args>;
15
- export default /** @type {import('yargs').CommandModule<{}, Args>} */ _default;
15
+ declare const _default: import('yargs').CommandModule<{}, Args>;
16
+ export default _default;
@@ -1,9 +1,11 @@
1
1
  export type Args = {
2
2
  dryRun?: boolean;
3
+ otp?: string;
3
4
  };
4
5
  /**
5
6
  * @typedef {Object} Args
6
7
  * @property {boolean} [dryRun] If true, will only log the commands without executing them
8
+ * @property {string} [otp] 6 digit auth code to forward to npm for two-factor authentication
7
9
  */
8
- declare const _default: import("yargs").CommandModule<{}, Args>;
9
- export default /** @type {import('yargs').CommandModule<{}, Args>} */ _default;
10
+ declare const _default: import('yargs').CommandModule<{}, Args>;
11
+ export default _default;
@@ -2,5 +2,5 @@
2
2
  export type Args = {
3
3
  pkg?: string[];
4
4
  };
5
- declare const _default: import("yargs").CommandModule<{}, Args>;
6
- export default /** @type {import('yargs').CommandModule<{}, Args>} */ _default;
5
+ declare const _default: import('yargs').CommandModule<{}, Args>;
6
+ export default _default;
@@ -0,0 +1,46 @@
1
+ export type ValeOS = 'Linux' | 'macOS' | 'Windows';
2
+ export type ValeArch = '64-bit' | 'arm64';
3
+ /**
4
+ * Extracts the replacement text from a vale alert.
5
+ * Returns null if no replacement can be determined.
6
+ * @param {{ Action: { Name: string; Params: string[] | null }; Message: string }} alert
7
+ * @returns {string | null}
8
+ */
9
+ export declare function getReplacementText(alert: {
10
+ Action: {
11
+ Name: string;
12
+ Params: string[] | null;
13
+ };
14
+ Message: string;
15
+ }): string | null;
16
+ /**
17
+ * Applies auto-fixes from vale alerts to the source files.
18
+ * Processes alerts in reverse order within each line to preserve column positions.
19
+ * @param {Record<string, Array<{ Action: { Name: string; Params: string[] | null }; Span: [number, number]; Check: string; Message: string; Severity: string; Match: string; Line: number }>>} results
20
+ * @param {'all' | 'error'} fixLevel
21
+ * @returns {Promise<{ fixed: number; skipped: number }>}
22
+ */
23
+ export declare function applyFixes(results: Record<string, Array<{
24
+ Action: {
25
+ Name: string;
26
+ Params: string[] | null;
27
+ };
28
+ Span: [number, number];
29
+ Check: string;
30
+ Message: string;
31
+ Severity: string;
32
+ Match: string;
33
+ Line: number;
34
+ }>>, fixLevel: 'all' | 'error'): Promise<{
35
+ fixed: number;
36
+ skipped: number;
37
+ }>;
38
+ export type Args = {
39
+ 'vale-version': string;
40
+ 'auto-fix': 'all' | 'error' | undefined;
41
+ };
42
+ /**
43
+ * @typedef {{ 'vale-version': string; 'auto-fix': 'all' | 'error' | undefined; }} Args
44
+ */
45
+ declare const _default: import('yargs').CommandModule<{}, Args>;
46
+ export default _default;
@@ -1,2 +1,2 @@
1
- declare const _default: import("yargs").CommandModule<{}, {}>;
2
- export default /** @type {import('yargs').CommandModule<{}, {}>} */ _default;
1
+ declare const _default: import('yargs').CommandModule<{}, {}>;
2
+ export default _default;
@@ -1,2 +1,2 @@
1
- declare const _default: import("eslint").Rule.RuleModule;
2
- export default /** @type {import('eslint').Rule.RuleModule} */ _default;
1
+ declare const _default: import('eslint').Rule.RuleModule;
2
+ export default _default;
@@ -1,2 +1,2 @@
1
- declare const _default: import("eslint").Rule.RuleModule;
2
- export default /** @type {import('eslint').Rule.RuleModule} */ _default;
1
+ declare const _default: import('eslint').Rule.RuleModule;
2
+ export default _default;
@@ -11,5 +11,5 @@ export type PatternConfig = {
11
11
  * Creates an ESLint rule that restricts imports based on their resolved paths.
12
12
  * Works with both ESM (import) and CommonJS (require) imports.
13
13
  */
14
- declare const _default: import("eslint").Rule.RuleModule;
15
- export default /** @type {import('eslint').Rule.RuleModule} */ _default;
14
+ declare const _default: import('eslint').Rule.RuleModule;
15
+ export default _default;
@@ -51,6 +51,6 @@ declare const _default: {
51
51
  * @param {import('./duplicate-h1.mjs').MdParams} params
52
52
  * @param {import('./duplicate-h1.mjs').OnError} onError
53
53
  */
54
- function: (params: MdParams, onError: OnError) => void;
54
+ function: (params: import('./duplicate-h1.mjs').MdParams, onError: import('./duplicate-h1.mjs').OnError) => void;
55
55
  };
56
56
  export default _default;
@@ -6,6 +6,6 @@ declare const _default: {
6
6
  * @param {import('./duplicate-h1.mjs').MdParams} params
7
7
  * @param {import('./duplicate-h1.mjs').OnError} onError
8
8
  */
9
- function: (params: import("./duplicate-h1.mjs").MdParams, onError: import("./duplicate-h1.mjs").OnError) => void;
9
+ function: (params: import('./duplicate-h1.mjs').MdParams, onError: import('./duplicate-h1.mjs').OnError) => void;
10
10
  };
11
11
  export default _default;
@@ -46,7 +46,7 @@ export declare function createBaseConfig(options?: {
46
46
  names: string[];
47
47
  description: string;
48
48
  tags: string[];
49
- function: (params: import("./duplicate-h1.mjs").MdParams, onError: import("./duplicate-h1.mjs").OnError) => void;
49
+ function: (params: import('./duplicate-h1.mjs').MdParams, onError: import('./duplicate-h1.mjs').OnError) => void;
50
50
  }[];
51
51
  ignores: string[];
52
52
  };
@@ -6,6 +6,6 @@ declare const _default: {
6
6
  * @param {import('./duplicate-h1.mjs').MdParams} params
7
7
  * @param {import('./duplicate-h1.mjs').OnError} onError
8
8
  */
9
- function: (params: import("./duplicate-h1.mjs").MdParams, onError: import("./duplicate-h1.mjs").OnError) => void;
9
+ function: (params: import('./duplicate-h1.mjs').MdParams, onError: import('./duplicate-h1.mjs').OnError) => void;
10
10
  };
11
11
  export default _default;
@@ -6,6 +6,6 @@ declare const _default: {
6
6
  * @param {import('./duplicate-h1.mjs').MdParams} params
7
7
  * @param {import('./duplicate-h1.mjs').OnError} onError
8
8
  */
9
- function: (params: import("./duplicate-h1.mjs").MdParams, onError: import("./duplicate-h1.mjs").OnError) => void;
9
+ function: (params: import('./duplicate-h1.mjs').MdParams, onError: import('./duplicate-h1.mjs').OnError) => void;
10
10
  };
11
11
  export default _default;
@@ -6,6 +6,6 @@ declare const _default: {
6
6
  * @param {import('./duplicate-h1.mjs').MdParams} params
7
7
  * @param {import('./duplicate-h1.mjs').OnError} onError
8
8
  */
9
- function: (params: import("./duplicate-h1.mjs").MdParams, onError: import("./duplicate-h1.mjs").OnError) => void;
9
+ function: (params: import('./duplicate-h1.mjs').MdParams, onError: import('./duplicate-h1.mjs').OnError) => void;
10
10
  };
11
11
  export default _default;
@@ -37,9 +37,9 @@ export declare function createPackageExports({ exports: packageExports, bundles,
37
37
  isFlat?: boolean;
38
38
  packageType?: 'module' | 'commonjs';
39
39
  }): Promise<{
40
- main?: string | undefined;
41
- types?: string | undefined;
42
- exports: import("../cli/packageJson").PackageJson.ExportConditions;
40
+ main?: string;
41
+ types?: string;
42
+ exports: import('../cli/packageJson').PackageJson.ExportConditions;
43
43
  }>;
44
44
  /**
45
45
  * @param {Object} param0
@@ -20,7 +20,7 @@ export type GitHubAppAuthenticationWithRefreshToken = {
20
20
  * @property {string} [refreshTokenExpiresAt] - ISO string when the refresh token expires
21
21
  */
22
22
  export declare function persistentAuthStrategy(): {
23
- hook: (request: import("@octokit/types").RequestInterface<object>, route: string, parameters: import("@octokit/types").RequestParameters) => Promise<import("@octokit/types").OctokitResponse<any, number>>;
23
+ hook: (request: import('@octokit/types').RequestInterface, route: import('@octokit/types').Route, parameters: import('@octokit/types').RequestParameters) => Promise<import("@octokit/types").OctokitResponse<any, number>>;
24
24
  };
25
25
  /**
26
26
  * @param {Object} [options]
@@ -31,6 +31,7 @@ export type GetWorkspacePackagesOptions = {
31
31
  publicOnly?: boolean;
32
32
  nonPublishedOnly?: boolean;
33
33
  cwd?: string;
34
+ filter?: string[];
34
35
  };
35
36
  export declare function getWorkspacePackages(options?: {
36
37
  publicOnly: true;
@@ -49,13 +50,78 @@ export declare function getWorkspacePackages(options?: GetWorkspacePackagesOptio
49
50
  * @returns {Promise<VersionInfo>} Version information
50
51
  */
51
52
  export declare function getPackageVersionInfo(packageName: string, baseVersion: string): Promise<VersionInfo>;
53
+ export type PublishSummaryEntry = {
54
+ name: string;
55
+ version: string;
56
+ };
57
+ /**
58
+ * @typedef {Object} PublishSummaryEntry
59
+ * @property {string} name
60
+ * @property {string} version
61
+ */
52
62
  /**
53
63
  * Publish packages with the given options
54
64
  * @param {PublicPackage[]} packages - Packages to publish
55
65
  * @param {PublishOptions} [options={}] - Publishing options
56
- * @returns {Promise<void>}
66
+ * @returns {Promise<PublishSummaryEntry[]>}
67
+ */
68
+ export declare function publishPackages(packages: PublicPackage[], options?: PublishOptions): Promise<PublishSummaryEntry[]>;
69
+ export type GetTransitiveDependenciesOptions = {
70
+ workspacePathByName?: Map<string, string>;
71
+ includeDev?: boolean;
72
+ };
73
+ /**
74
+ * @typedef {Object} GetTransitiveDependenciesOptions
75
+ * @property {Map<string, string>} [workspacePathByName] - Map of workspace package name to directory path
76
+ * @property {boolean} [includeDev=true] - Whether to include devDependencies in the traversal
77
+ */
78
+ /**
79
+ * Get all transitive workspace dependencies for a set of packages.
80
+ *
81
+ * Only follows deps whose version spec starts with `workspace:` (e.g. `workspace:*`
82
+ * or `workspace:^`), meaning they are sourced directly from the monorepo. Pinned
83
+ * external versions (e.g. `^1.0.0`) are ignored even when the package name exists
84
+ * in the workspace. Traverses `dependencies` and optionally `devDependencies`.
85
+ * Results are cached per package so each package is read from disk at most once
86
+ * regardless of how many roots depend on it.
87
+ *
88
+ * @param {string[]} packageNames - Package names to start the traversal from
89
+ * @param {GetTransitiveDependenciesOptions} [options]
90
+ * @returns {Promise<Set<string>>} All reachable workspace package names, including the input packages themselves
91
+ */
92
+ export declare function getTransitiveDependencies(packageNames: string[], options?: GetTransitiveDependenciesOptions): Promise<Set<string>>;
93
+ /**
94
+ * Pure validation logic: given a publish set and workspace maps, checks that all
95
+ * transitive hard workspace dependencies are covered and none are private.
96
+ *
97
+ * A hard dependency is one listed in `dependencies` (not `peerDependencies` or
98
+ * `devDependencies`) using a `workspace:` version specifier (e.g. `workspace:*` or
99
+ * `workspace:^`). Peer dependencies are never bundled and dev dependencies are not installed
100
+ * on consumer devices - both are excluded regardless of version specifier. Pinned-version
101
+ * references in `dependencies` are also excluded - they resolve from the registry and do
102
+ * not need to be co-published.
103
+ *
104
+ * @param {PublicPackage[]} packages - The packages intended for publishing
105
+ * @param {Map<string, PublicPackage | PrivatePackage>} workspacePackageByName - All workspace packages by name
106
+ * @param {Map<string, string>} workspacePathByName - Map of workspace package name to directory path
107
+ * @returns {Promise<{issues: string[]}>}
108
+ * List of human-readable issue strings. Empty when the dependency set is valid.
109
+ * @internal
110
+ */
111
+ export declare function checkPublishDependencies(packages: PublicPackage[], workspacePackageByName: Map<string, PublicPackage | PrivatePackage>, workspacePathByName: Map<string, string>): Promise<{
112
+ issues: string[];
113
+ }>;
114
+ /**
115
+ * Validate that a set of packages covers all of their transitive hard workspace dependencies,
116
+ * and that none of those dependencies are private (which would make them unpublishable).
117
+ *
118
+ * @param {PublicPackage[]} packages - The packages intended for publishing
119
+ * @returns {Promise<{issues: string[]}>}
120
+ * List of human-readable issue strings. Empty when the dependency set is valid.
57
121
  */
58
- export declare function publishPackages(packages: PublicPackage[], options?: PublishOptions): Promise<void>;
122
+ export declare function validatePublishDependencies(packages: PublicPackage[]): Promise<{
123
+ issues: string[];
124
+ }>;
59
125
  /**
60
126
  * Read package.json from a directory
61
127
  * @param {string} packagePath - Path to package directory
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Creates a temporary directory and registers an `onTestFinished` hook to
3
+ * remove it automatically when the current test ends — even if the test throws.
4
+ *
5
+ * @returns {Promise<string>} The path of the created temporary directory.
6
+ */
7
+ export declare function makeTempDir(): Promise<string>;