@mui/internal-code-infra 0.0.4-canary.98 → 0.1.1-canary.0
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.
- package/README.md +4 -0
- package/build/babel-config.d.mts +4 -4
- package/build/babelPluginInlineEnvironmentVariables.d.mts +11 -0
- package/build/brokenLinksChecker/index.d.mts +147 -0
- package/build/changelog/fetchChangelogs.d.mts +3 -0
- package/build/cli/cmdArgosPush.d.mts +6 -0
- package/build/cli/cmdBuild.d.mts +45 -0
- package/build/cli/cmdCopyFiles.d.mts +12 -0
- package/build/cli/cmdGenerateChangelog.d.mts +15 -0
- package/build/cli/cmdListWorkspaces.d.mts +14 -2
- package/build/cli/cmdNetlifyIgnore.d.mts +9 -0
- package/build/cli/cmdPublish.d.mts +20 -2
- package/build/cli/cmdPublishCanary.d.mts +18 -0
- package/build/cli/cmdPublishNewPackage.d.mts +6 -0
- package/build/cli/cmdRenameScope.d.mts +18 -0
- package/build/cli/cmdSetVersionOverrides.d.mts +3 -0
- package/build/eslint/mui/rules/no-restricted-resolved-imports.d.mts +6 -0
- package/build/eslint/testConfig.d.mts +1 -7
- package/build/utils/babel.d.mts +6 -0
- package/build/utils/build.d.mts +3 -15
- package/build/utils/extractErrorCodes.d.mts +16 -0
- package/build/utils/git.d.mts +9 -0
- package/build/utils/github.d.mts +12 -0
- package/build/utils/pnpm.d.mts +147 -9
- package/build/utils/testUtils.d.mts +21 -0
- package/build/utils/typescript.d.mts +2 -2
- package/package.json +54 -56
- package/src/babel-config.mjs +21 -11
- package/src/babelPluginInlineEnvironmentVariables.mjs +45 -0
- package/src/brokenLinksChecker/index.mjs +3 -3
- package/src/cli/cmdArgosPush.mjs +2 -4
- package/src/cli/cmdBuild.mjs +8 -9
- package/src/cli/cmdCopyFiles.mjs +3 -3
- package/src/cli/cmdListWorkspaces.mjs +3 -31
- package/src/cli/cmdPublish.mjs +23 -29
- package/src/cli/cmdRenameScope.mjs +77 -0
- package/src/cli/cmdSetVersionOverrides.mjs +32 -25
- package/src/cli/cmdVale.mjs +3 -6
- package/src/cli/cmdValidateBuiltTypes.mjs +3 -4
- package/src/cli/index.mjs +2 -0
- package/src/eslint/testConfig.mjs +3 -31
- package/src/untyped-plugins.d.ts +11 -49
- package/src/utils/build.mjs +0 -39
- package/src/utils/extractErrorCodes.mjs +12 -7
- package/src/utils/pnpm.mjs +380 -16
- package/src/utils/testUtils.mjs +35 -0
- package/src/utils/typescript.mjs +60 -42
package/README.md
CHANGED
|
@@ -70,3 +70,7 @@ pnpm code-infra publish-new-package --otp=123456
|
|
|
70
70
|
7. Finally, save the changes by clicking on `Update Package Settings` button.
|
|
71
71
|
|
|
72
72
|
After following these steps, the `Publish` workflow can be invoked again.
|
|
73
|
+
|
|
74
|
+
## Agent skills
|
|
75
|
+
|
|
76
|
+
The agent skills previously shipped with this package now live at the repository root. See [Install instructions](../../README.md#agent-skills).
|
package/build/babel-config.d.mts
CHANGED
|
@@ -14,7 +14,7 @@ export type ReactCompilationMode = 'annotation' | 'syntax' | 'infer' | 'all';
|
|
|
14
14
|
* @param {string} [param0.reactCompilerReactVersion]
|
|
15
15
|
* @param {ReactCompilationMode} [param0.reactCompilerMode]
|
|
16
16
|
* @param {{ allowedCallees?: Record<string, string[]> }} [param0.displayName] - Options for the display name plugin.
|
|
17
|
-
* @returns {import('@babel/core').
|
|
17
|
+
* @returns {import('@babel/core').InputOptions} The base Babel configuration.
|
|
18
18
|
*/
|
|
19
19
|
export declare function getBaseConfig({ debug, optimizeClsx, removePropTypes, noResolveImports, bundle, runtimeVersion, outExtension, reactCompilerReactVersion, reactCompilerMode, displayName, }: {
|
|
20
20
|
debug?: boolean;
|
|
@@ -29,7 +29,7 @@ export declare function getBaseConfig({ debug, optimizeClsx, removePropTypes, no
|
|
|
29
29
|
displayName?: {
|
|
30
30
|
allowedCallees?: Record<string, string[]>;
|
|
31
31
|
};
|
|
32
|
-
}): import('@babel/core').
|
|
32
|
+
}): import('@babel/core').InputOptions;
|
|
33
33
|
export type Options = {
|
|
34
34
|
bundle?: 'esm' | 'cjs';
|
|
35
35
|
noResolveImports?: boolean;
|
|
@@ -43,6 +43,6 @@ export type Options = {
|
|
|
43
43
|
*/
|
|
44
44
|
/**
|
|
45
45
|
* @param {import('@babel/core').ConfigAPI | Options} api
|
|
46
|
-
* @returns {import('@babel/core').
|
|
46
|
+
* @returns {import('@babel/core').InputOptions}
|
|
47
47
|
*/
|
|
48
|
-
export default function getBabelConfig(api: import('@babel/core').ConfigAPI | Options): import('@babel/core').
|
|
48
|
+
export default function getBabelConfig(api: import('@babel/core').ConfigAPI | Options): import('@babel/core').InputOptions;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Inlines `process.env.X` member expressions with their build-time value.
|
|
3
|
+
*
|
|
4
|
+
* Forked from `babel-plugin-transform-inline-environment-variables` (unmaintained, last
|
|
5
|
+
* published 2022) because it calls the now-removed `NodePath#toComputedKey()` under Babel 8's
|
|
6
|
+
* `@babel/traverse`. Behavior is otherwise identical to the upstream plugin.
|
|
7
|
+
*
|
|
8
|
+
* @param {import('@babel/core').PluginAPI} api
|
|
9
|
+
* @returns {import('@babel/core').PluginObject}
|
|
10
|
+
*/
|
|
11
|
+
export default function babelPluginInlineEnvironmentVariables({ types: t }: import('@babel/core').PluginAPI): import('@babel/core').PluginObject;
|
|
@@ -1,40 +1,103 @@
|
|
|
1
1
|
export type LinkStructure = Map<string, Set<string>>;
|
|
2
2
|
export type SerializedLinkStructure = {
|
|
3
|
+
/**
|
|
4
|
+
* - Object mapping page URLs to arrays of target IDs
|
|
5
|
+
*/
|
|
3
6
|
targets: Record<string, string[]>;
|
|
4
7
|
};
|
|
5
8
|
export type CrawlWorkerInput = {
|
|
9
|
+
/**
|
|
10
|
+
* - The page URL to crawl
|
|
11
|
+
*/
|
|
6
12
|
pageUrl: string;
|
|
13
|
+
/**
|
|
14
|
+
* - Fully resolved crawl options
|
|
15
|
+
*/
|
|
7
16
|
options: ResolvedCrawlOptions;
|
|
8
17
|
};
|
|
9
18
|
export type CrawlWorkerPageData = {
|
|
19
|
+
/**
|
|
20
|
+
* - The normalized page URL
|
|
21
|
+
*/
|
|
10
22
|
url: string;
|
|
23
|
+
/**
|
|
24
|
+
* - HTTP status code
|
|
25
|
+
*/
|
|
11
26
|
status: number;
|
|
27
|
+
/**
|
|
28
|
+
* - Array of anchor targets (e.g., '#intro')
|
|
29
|
+
*/
|
|
12
30
|
targets: string[];
|
|
31
|
+
/**
|
|
32
|
+
* - Content-type of the page
|
|
33
|
+
*/
|
|
13
34
|
contentType: string;
|
|
14
35
|
};
|
|
15
36
|
export type CrawlWorkerOutput = {
|
|
37
|
+
/**
|
|
38
|
+
* - Serialized page data
|
|
39
|
+
*/
|
|
16
40
|
pageData: CrawlWorkerPageData;
|
|
41
|
+
/**
|
|
42
|
+
* - Links discovered on the page
|
|
43
|
+
*/
|
|
17
44
|
links: Link[];
|
|
45
|
+
/**
|
|
46
|
+
* - HTML validation results, or null if validation was skipped/passed
|
|
47
|
+
*/
|
|
18
48
|
htmlValidateResults: {
|
|
19
49
|
pageUrl: string;
|
|
20
50
|
results: import('html-validate').Result[];
|
|
21
51
|
} | null;
|
|
22
52
|
};
|
|
23
53
|
export type PageData = {
|
|
54
|
+
/**
|
|
55
|
+
* - The normalized page URL (without trailing slash unless root)
|
|
56
|
+
*/
|
|
24
57
|
url: string;
|
|
58
|
+
/**
|
|
59
|
+
* - HTTP status code from the response (e.g., 200, 404, 500)
|
|
60
|
+
*/
|
|
25
61
|
status: number;
|
|
62
|
+
/**
|
|
63
|
+
* - Set of available anchor targets on the page, keyed by hash (e.g., '#intro')
|
|
64
|
+
*/
|
|
26
65
|
targets: Set<string>;
|
|
66
|
+
/**
|
|
67
|
+
* - Content-type of the page (e.g., 'text/html', 'text/markdown')
|
|
68
|
+
*/
|
|
27
69
|
contentType: string;
|
|
28
70
|
};
|
|
29
71
|
export type Link = {
|
|
72
|
+
/**
|
|
73
|
+
* - URL of the page where this link was found, or null for seed URLs
|
|
74
|
+
*/
|
|
30
75
|
src: string | null;
|
|
76
|
+
/**
|
|
77
|
+
* - Accessible name/text content of the link element, or null for seed URLs
|
|
78
|
+
*/
|
|
31
79
|
text: string | null;
|
|
80
|
+
/**
|
|
81
|
+
* - The href attribute value (may be relative or absolute, with or without hash)
|
|
82
|
+
*/
|
|
32
83
|
href: string;
|
|
84
|
+
/**
|
|
85
|
+
* - Content-type of the source page (e.g., 'text/html', 'text/markdown')
|
|
86
|
+
*/
|
|
33
87
|
contentType?: string | null;
|
|
34
88
|
};
|
|
35
89
|
export type IgnoreRule = {
|
|
90
|
+
/**
|
|
91
|
+
* - Pattern(s) to match source page path
|
|
92
|
+
*/
|
|
36
93
|
path?: (string | RegExp) | (string | RegExp)[];
|
|
94
|
+
/**
|
|
95
|
+
* - Pattern(s) to match broken link href
|
|
96
|
+
*/
|
|
37
97
|
href?: (string | RegExp) | (string | RegExp)[];
|
|
98
|
+
/**
|
|
99
|
+
* - Pattern(s) to match source page content-type
|
|
100
|
+
*/
|
|
38
101
|
contentType?: (string | RegExp) | (string | RegExp)[];
|
|
39
102
|
};
|
|
40
103
|
export type NormalizedIgnoreRule = {
|
|
@@ -43,22 +106,67 @@ export type NormalizedIgnoreRule = {
|
|
|
43
106
|
contentType: (string | RegExp)[] | undefined;
|
|
44
107
|
};
|
|
45
108
|
export type CrawlOptions = {
|
|
109
|
+
/**
|
|
110
|
+
* - Shell command to start the dev server (e.g., 'npm run dev'). If null, assumes server is already running
|
|
111
|
+
*/
|
|
46
112
|
startCommand?: string | null;
|
|
113
|
+
/**
|
|
114
|
+
* - Base URL of the site to crawl (e.g., 'http://localhost:3000')
|
|
115
|
+
*/
|
|
47
116
|
host: string;
|
|
117
|
+
/**
|
|
118
|
+
* - File path to write discovered link targets to. If null, targets are not persisted
|
|
119
|
+
*/
|
|
48
120
|
outPath?: string | null;
|
|
121
|
+
/**
|
|
122
|
+
* - Array of regex patterns to exclude from crawling (e.g., [/^\/api\//] to skip /api/* routes)
|
|
123
|
+
*/
|
|
49
124
|
ignoredPaths?: RegExp[];
|
|
125
|
+
/**
|
|
126
|
+
* - CSS selectors for elements whose nested links should be ignored (e.g., ['.sidebar', 'footer'])
|
|
127
|
+
*/
|
|
50
128
|
ignoredContent?: string[];
|
|
129
|
+
/**
|
|
130
|
+
* - Set of element IDs to ignore as link targets (defaults to '__next', '__NEXT_DATA__')
|
|
131
|
+
*/
|
|
51
132
|
ignoredTargets?: Set<string>;
|
|
133
|
+
/**
|
|
134
|
+
* - Pre-populated map of known valid targets to skip crawling (useful for external pages)
|
|
135
|
+
*/
|
|
52
136
|
knownTargets?: Map<string, Set<string>>;
|
|
137
|
+
/**
|
|
138
|
+
* - URLs to fetch known targets from (fetched JSON will be merged with knownTargets)
|
|
139
|
+
*/
|
|
53
140
|
knownTargetsDownloadUrl?: string[];
|
|
141
|
+
/**
|
|
142
|
+
* - Number of concurrent page fetches (defaults to 4)
|
|
143
|
+
*/
|
|
54
144
|
concurrency?: number;
|
|
145
|
+
/**
|
|
146
|
+
* - Starting URLs for the crawl (defaults to ['/'])
|
|
147
|
+
*/
|
|
55
148
|
seedUrls?: string[];
|
|
149
|
+
/**
|
|
150
|
+
* - Rules to ignore broken links. Each rule can have path, href, contentType, and/or has properties. All specified properties must match (AND logic). Within a property, multiple values use OR logic.
|
|
151
|
+
*/
|
|
56
152
|
ignores?: IgnoreRule[];
|
|
153
|
+
/**
|
|
154
|
+
* - Enable HTML validation on crawled pages. `false` (default): disabled. `true`: validate with recommended rules. Object: use as html-validate config — `mui:recommended` is always applied as the baseline, so most callers only need to set `rules`. Array: per-path config overrides — `mui:recommended` is applied once as the baseline and every entry whose `path` matches the page URL is layered on top; later matching entries win on conflicting rule keys. If an entry omits `extends`, it behaves like a rule patch and typically only changes the rules it names. If an entry includes `extends` (for example, re-extending `mui:recommended`), it can re-introduce or reset baseline presets rather than acting as a pure patch. An entry without `path` matches every page. If no entry matches, the page is not validated.
|
|
155
|
+
*/
|
|
57
156
|
htmlValidate?: HtmlValidateOption;
|
|
157
|
+
/**
|
|
158
|
+
* - Log extra diagnostics during crawling (e.g. resolved html-validate config per page). Defaults to `false`.
|
|
159
|
+
*/
|
|
58
160
|
verbose?: boolean;
|
|
59
161
|
};
|
|
60
162
|
export type HtmlValidateOverride = {
|
|
163
|
+
/**
|
|
164
|
+
* - Pattern(s) to match the page URL. Strings use exact match. Omit to match every page.
|
|
165
|
+
*/
|
|
61
166
|
path?: (string | RegExp) | (string | RegExp)[];
|
|
167
|
+
/**
|
|
168
|
+
* - html-validate config (or `true` for `mui:recommended`).
|
|
169
|
+
*/
|
|
62
170
|
config: true | import('html-validate').ConfigData;
|
|
63
171
|
};
|
|
64
172
|
export type HtmlValidateOption = boolean | import('html-validate').ConfigData | HtmlValidateOverride[];
|
|
@@ -71,26 +179,65 @@ export type ResolvedCrawlOptions = Omit<Required<CrawlOptions>, 'ignores' | 'htm
|
|
|
71
179
|
htmlValidate: ResolvedHtmlValidateEntry[];
|
|
72
180
|
};
|
|
73
181
|
export type BrokenLinkIssue = {
|
|
182
|
+
/**
|
|
183
|
+
* - Type of issue: 'broken-link' for 404 pages, 'broken-target' for missing anchors
|
|
184
|
+
*/
|
|
74
185
|
type: 'broken-link' | 'broken-target';
|
|
186
|
+
/**
|
|
187
|
+
* - Human-readable description of the issue (e.g., 'Target not found', 'Page returned error 404')
|
|
188
|
+
*/
|
|
75
189
|
message: string;
|
|
190
|
+
/**
|
|
191
|
+
* - The link object that has the issue
|
|
192
|
+
*/
|
|
76
193
|
link: Link;
|
|
77
194
|
};
|
|
78
195
|
export type HtmlValidateIssue = {
|
|
196
|
+
/**
|
|
197
|
+
* - Issue type discriminator
|
|
198
|
+
*/
|
|
79
199
|
type: 'html-validate';
|
|
200
|
+
/**
|
|
201
|
+
* - Human-readable description of the issue
|
|
202
|
+
*/
|
|
80
203
|
message: string;
|
|
204
|
+
/**
|
|
205
|
+
* - The page URL where the issue was found
|
|
206
|
+
*/
|
|
81
207
|
pageUrl: string;
|
|
208
|
+
/**
|
|
209
|
+
* - The html-validate rule that triggered this issue (e.g., 'no-dup-id')
|
|
210
|
+
*/
|
|
82
211
|
ruleId: string;
|
|
212
|
+
/**
|
|
213
|
+
* - Severity level (1 = warning, 2 = error)
|
|
214
|
+
*/
|
|
83
215
|
severity: number;
|
|
216
|
+
/**
|
|
217
|
+
* - Source location of the issue
|
|
218
|
+
*/
|
|
84
219
|
location: {
|
|
85
220
|
line: number;
|
|
86
221
|
column: number;
|
|
87
222
|
};
|
|
223
|
+
/**
|
|
224
|
+
* - DOM selector for the element, or null
|
|
225
|
+
*/
|
|
88
226
|
selector: string | null;
|
|
89
227
|
};
|
|
90
228
|
export type Issue = BrokenLinkIssue | HtmlValidateIssue;
|
|
91
229
|
export type CrawlResult = {
|
|
230
|
+
/**
|
|
231
|
+
* - All links discovered during the crawl
|
|
232
|
+
*/
|
|
92
233
|
links: Set<Link>;
|
|
234
|
+
/**
|
|
235
|
+
* - All pages crawled, keyed by normalized URL
|
|
236
|
+
*/
|
|
93
237
|
pages: Map<string, PageData>;
|
|
238
|
+
/**
|
|
239
|
+
* - All issues found (broken links, broken targets, and HTML validation issues)
|
|
240
|
+
*/
|
|
94
241
|
issues: Issue[];
|
|
95
242
|
};
|
|
96
243
|
/**
|
package/build/cli/cmdBuild.d.mts
CHANGED
|
@@ -1,18 +1,63 @@
|
|
|
1
1
|
export type Args = {
|
|
2
|
+
/**
|
|
3
|
+
* - The bundles to build.
|
|
4
|
+
*/
|
|
2
5
|
bundle: import('../utils/build.mjs').BundleType[];
|
|
6
|
+
/**
|
|
7
|
+
* - The large files to build.
|
|
8
|
+
*/
|
|
3
9
|
hasLargeFiles: boolean;
|
|
10
|
+
/**
|
|
11
|
+
* - Whether to skip generating a package.json file in the /esm folder.
|
|
12
|
+
*/
|
|
4
13
|
skipBundlePackageJson: boolean;
|
|
14
|
+
/**
|
|
15
|
+
* - Whether to enable verbose logging.
|
|
16
|
+
*/
|
|
5
17
|
verbose: boolean;
|
|
18
|
+
/**
|
|
19
|
+
* - Whether to build types for the package.
|
|
20
|
+
*/
|
|
6
21
|
buildTypes: boolean;
|
|
22
|
+
/**
|
|
23
|
+
* - Whether to build types for the package.
|
|
24
|
+
*/
|
|
7
25
|
skipTsc: boolean;
|
|
26
|
+
/**
|
|
27
|
+
* - Whether to skip checking for Babel runtime dependencies in the package.
|
|
28
|
+
*/
|
|
8
29
|
skipBabelRuntimeCheck: boolean;
|
|
30
|
+
/**
|
|
31
|
+
* - Whether to skip generating the package.json file in the bundle output.
|
|
32
|
+
*/
|
|
9
33
|
skipPackageJson: boolean;
|
|
34
|
+
/**
|
|
35
|
+
* - Whether to skip checking for main field in package.json.
|
|
36
|
+
*/
|
|
10
37
|
skipMainCheck: boolean;
|
|
38
|
+
/**
|
|
39
|
+
* - Globs to be ignored by Babel.
|
|
40
|
+
*/
|
|
11
41
|
ignore: string[];
|
|
42
|
+
/**
|
|
43
|
+
* - Files/Directories to be copied. Can be a glob pattern.
|
|
44
|
+
*/
|
|
12
45
|
copy?: string[];
|
|
46
|
+
/**
|
|
47
|
+
* - Whether to use the React compiler.
|
|
48
|
+
*/
|
|
13
49
|
enableReactCompiler?: boolean;
|
|
50
|
+
/**
|
|
51
|
+
* - Whether to build types using the native TypeScript compiler.
|
|
52
|
+
*/
|
|
14
53
|
tsgo?: boolean;
|
|
54
|
+
/**
|
|
55
|
+
* - Deprecated no-op; flat builds are always used.
|
|
56
|
+
*/
|
|
15
57
|
flat?: boolean;
|
|
58
|
+
/**
|
|
59
|
+
* - Whether to enumerate glob patterns in exports/imports into concrete entries.
|
|
60
|
+
*/
|
|
16
61
|
expand: boolean;
|
|
17
62
|
};
|
|
18
63
|
declare const _default: import('yargs').CommandModule<{}, Args>;
|
|
@@ -1,7 +1,19 @@
|
|
|
1
1
|
export type Args = {
|
|
2
|
+
/**
|
|
3
|
+
* Run in silent mode without logging
|
|
4
|
+
*/
|
|
2
5
|
silent?: boolean;
|
|
6
|
+
/**
|
|
7
|
+
* Exclude default files from the copy operation
|
|
8
|
+
*/
|
|
3
9
|
excludeDefaults?: boolean;
|
|
10
|
+
/**
|
|
11
|
+
* Glob patterns to copy
|
|
12
|
+
*/
|
|
4
13
|
glob?: string[];
|
|
14
|
+
/**
|
|
15
|
+
* Extra files to copy
|
|
16
|
+
*/
|
|
5
17
|
files?: string[];
|
|
6
18
|
};
|
|
7
19
|
declare const _default: import('yargs').CommandModule<{}, Args>;
|
|
@@ -1,8 +1,23 @@
|
|
|
1
1
|
export type Args = {
|
|
2
|
+
/**
|
|
3
|
+
* Path to the changelog configuration file
|
|
4
|
+
*/
|
|
2
5
|
config: string;
|
|
6
|
+
/**
|
|
7
|
+
* The git reference (tag/commit) of the last release
|
|
8
|
+
*/
|
|
3
9
|
lastRelease: string;
|
|
10
|
+
/**
|
|
11
|
+
* The git reference (tag/commit) of the new release
|
|
12
|
+
*/
|
|
4
13
|
release: string;
|
|
14
|
+
/**
|
|
15
|
+
* The version number for the new release
|
|
16
|
+
*/
|
|
5
17
|
releaseVersion: string;
|
|
18
|
+
/**
|
|
19
|
+
* The current working directory to run the command in
|
|
20
|
+
*/
|
|
6
21
|
cwd: string;
|
|
7
22
|
};
|
|
8
23
|
/**
|
|
@@ -1,15 +1,27 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
export type PublicPackage = import('../utils/pnpm.mjs').PublicPackage;
|
|
3
3
|
export type Args = {
|
|
4
|
+
/**
|
|
5
|
+
* - Whether to filter to only public packages
|
|
6
|
+
*/
|
|
4
7
|
publicOnly?: boolean;
|
|
5
|
-
|
|
8
|
+
/**
|
|
9
|
+
* - Output format (name, path, or json)
|
|
10
|
+
*/
|
|
11
|
+
output?: 'json' | 'path' | 'name';
|
|
12
|
+
/**
|
|
13
|
+
* - Git reference to filter changes since
|
|
14
|
+
*/
|
|
6
15
|
sinceRef?: string;
|
|
16
|
+
/**
|
|
17
|
+
* - Same as filtering packages with --filter in pnpm. Only include packages matching the filter. See https://pnpm.io/filtering.
|
|
18
|
+
*/
|
|
7
19
|
filter?: string[];
|
|
8
20
|
};
|
|
9
21
|
/**
|
|
10
22
|
* @typedef {Object} Args
|
|
11
23
|
* @property {boolean} [publicOnly] - Whether to filter to only public packages
|
|
12
|
-
* @property {'json'|'path'|'name'
|
|
24
|
+
* @property {'json'|'path'|'name'} [output] - Output format (name, path, or json)
|
|
13
25
|
* @property {string} [sinceRef] - Git reference to filter changes since
|
|
14
26
|
* @property {string[]} [filter] - Same as filtering packages with --filter in pnpm. Only include packages matching the filter. See https://pnpm.io/filtering.
|
|
15
27
|
*/
|
|
@@ -1,7 +1,16 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
export type Args = {
|
|
3
|
+
/**
|
|
4
|
+
* - List of workspace names to process
|
|
5
|
+
*/
|
|
3
6
|
workspaces: string[];
|
|
7
|
+
/**
|
|
8
|
+
* - Check mode - error if the generated content differs from current
|
|
9
|
+
*/
|
|
4
10
|
check?: boolean;
|
|
11
|
+
/**
|
|
12
|
+
* - Branch to compare PRs against (default: master)
|
|
13
|
+
*/
|
|
5
14
|
baseBranch?: string;
|
|
6
15
|
};
|
|
7
16
|
declare const _default: import('yargs').CommandModule<{}, Args>;
|
|
@@ -3,11 +3,29 @@ export type PublicPackage = import('../utils/pnpm.mjs').PublicPackage;
|
|
|
3
3
|
export type PublishOptions = import('../utils/pnpm.mjs').PublishOptions;
|
|
4
4
|
export type PublishSummaryEntry = import('../utils/pnpm.mjs').PublishSummaryEntry;
|
|
5
5
|
export type Args = {
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
/**
|
|
7
|
+
* Run in dry-run mode without publishing
|
|
8
|
+
*/
|
|
9
|
+
"dry-run": boolean;
|
|
10
|
+
/**
|
|
11
|
+
* Create a GitHub draft release after publishing
|
|
12
|
+
*/
|
|
13
|
+
"github-release": boolean;
|
|
14
|
+
/**
|
|
15
|
+
* NPM dist tag to publish to
|
|
16
|
+
*/
|
|
8
17
|
tag: string;
|
|
18
|
+
/**
|
|
19
|
+
* Runs in CI environment
|
|
20
|
+
*/
|
|
9
21
|
ci: boolean;
|
|
22
|
+
/**
|
|
23
|
+
* Git SHA to use for the GitHub release workflow (local only)
|
|
24
|
+
*/
|
|
10
25
|
sha?: string;
|
|
26
|
+
/**
|
|
27
|
+
* Same as filtering packages with --filter in pnpm. Only publish packages matching the filter. See https://pnpm.io/filtering.
|
|
28
|
+
*/
|
|
11
29
|
filter?: string[];
|
|
12
30
|
};
|
|
13
31
|
declare const _default: import('yargs').CommandModule<{}, Args>;
|
|
@@ -3,13 +3,31 @@ export type PublicPackage = import('../utils/pnpm.mjs').PublicPackage;
|
|
|
3
3
|
export type VersionInfo = import('../utils/pnpm.mjs').VersionInfo;
|
|
4
4
|
export type PublishOptions = import('../utils/pnpm.mjs').PublishOptions;
|
|
5
5
|
export type Args = {
|
|
6
|
+
/**
|
|
7
|
+
* - Whether to run in dry-run mode
|
|
8
|
+
*/
|
|
6
9
|
dryRun?: boolean;
|
|
10
|
+
/**
|
|
11
|
+
* - Whether to create GitHub releases for canary packages
|
|
12
|
+
*/
|
|
7
13
|
githubRelease?: boolean;
|
|
14
|
+
/**
|
|
15
|
+
* - Same as filtering packages with --filter in pnpm. Only publish packages matching the filter. See https://pnpm.io/filtering.
|
|
16
|
+
*/
|
|
8
17
|
filter?: string[];
|
|
9
18
|
};
|
|
10
19
|
export type Commit = {
|
|
20
|
+
/**
|
|
21
|
+
* - Commit SHA
|
|
22
|
+
*/
|
|
11
23
|
sha: string;
|
|
24
|
+
/**
|
|
25
|
+
* - Commit message
|
|
26
|
+
*/
|
|
12
27
|
message: string;
|
|
28
|
+
/**
|
|
29
|
+
* - Commit author
|
|
30
|
+
*/
|
|
13
31
|
author: string;
|
|
14
32
|
};
|
|
15
33
|
declare const _default: import('yargs').CommandModule<{}, Args>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
export type Args = {
|
|
3
|
+
/**
|
|
4
|
+
* Source and target scope
|
|
5
|
+
*/
|
|
6
|
+
alias: [string, string];
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* @typedef {Object} Args
|
|
10
|
+
* @property {[string, string]} alias Source and target scope
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
* @param {string} alias
|
|
14
|
+
* @returns {[string, string]}
|
|
15
|
+
*/
|
|
16
|
+
export declare function parseAlias(alias: string): [string, string];
|
|
17
|
+
declare const _default: import('yargs').CommandModule<{}, Args>;
|
|
18
|
+
export default _default;
|
|
@@ -3,12 +3,6 @@
|
|
|
3
3
|
*/
|
|
4
4
|
export declare const baseSpecRules: import('eslint').Linter.Config;
|
|
5
5
|
/**
|
|
6
|
-
* @param {Object} [options]
|
|
7
|
-
* @param {boolean} [options.useMocha]
|
|
8
|
-
* @param {boolean} [options.useVitest]
|
|
9
6
|
* @returns {import('eslint').Linter.Config[]}
|
|
10
7
|
*/
|
|
11
|
-
export declare function createTestConfig(
|
|
12
|
-
useMocha?: boolean;
|
|
13
|
-
useVitest?: boolean;
|
|
14
|
-
}): import('eslint').Linter.Config[];
|
|
8
|
+
export declare function createTestConfig(): import('eslint').Linter.Config[];
|
package/build/utils/babel.d.mts
CHANGED
|
@@ -15,7 +15,13 @@ export declare function cjsCopy({ from, to }: {
|
|
|
15
15
|
to: string;
|
|
16
16
|
}): Promise<void>;
|
|
17
17
|
export type ErrorCodeMetadata = {
|
|
18
|
+
/**
|
|
19
|
+
* - The path where the error code file should be written.
|
|
20
|
+
*/
|
|
18
21
|
outputPath: string;
|
|
22
|
+
/**
|
|
23
|
+
* - The runtime module to replace the errors with.
|
|
24
|
+
*/
|
|
19
25
|
runtimeModule?: string;
|
|
20
26
|
};
|
|
21
27
|
/**
|
package/build/utils/build.d.mts
CHANGED
|
@@ -2,6 +2,9 @@ export type BundleType = 'esm' | 'cjs';
|
|
|
2
2
|
export type BundleMeta = {
|
|
3
3
|
type: BundleType;
|
|
4
4
|
dir: string;
|
|
5
|
+
/**
|
|
6
|
+
* - The package.json condition this bundle maps to.
|
|
7
|
+
*/
|
|
5
8
|
condition: 'import' | 'require';
|
|
6
9
|
outExtension: string;
|
|
7
10
|
typeOutExtension: string;
|
|
@@ -104,18 +107,3 @@ export declare function markFn<F extends () => Promise<any>>(label: string, fn:
|
|
|
104
107
|
* @param {string} label
|
|
105
108
|
*/
|
|
106
109
|
export declare function measureFn(label: string): PerformanceMeasure;
|
|
107
|
-
/**
|
|
108
|
-
* A utility to map a function over an array of items in a worker pool.
|
|
109
|
-
*
|
|
110
|
-
* This function will create a pool of workers and distribute the items to be processed among them.
|
|
111
|
-
* Each worker will process items sequentially, but multiple workers will run in parallel.
|
|
112
|
-
*
|
|
113
|
-
* @function
|
|
114
|
-
* @template T
|
|
115
|
-
* @template R
|
|
116
|
-
* @param {T[]} items
|
|
117
|
-
* @param {(item: T) => Promise<R>} mapper
|
|
118
|
-
* @param {number} concurrency
|
|
119
|
-
* @returns {Promise<(R|Error)[]>}
|
|
120
|
-
*/
|
|
121
|
-
export declare function mapConcurrently<T, R>(items: T[], mapper: (item: T) => Promise<R>, concurrency: number): Promise<(R | Error)[]>;
|
|
@@ -1,8 +1,24 @@
|
|
|
1
1
|
export type Args = {
|
|
2
|
+
/**
|
|
3
|
+
* - The output path to write the extracted error codes.
|
|
4
|
+
*/
|
|
2
5
|
errorCodesPath: string;
|
|
6
|
+
/**
|
|
7
|
+
* - List of package names to skip. By default, all workspace packages are considered.
|
|
8
|
+
*/
|
|
3
9
|
skip?: string[];
|
|
10
|
+
/**
|
|
11
|
+
* - The detection strategy to use when extracting error codes.
|
|
12
|
+
*/
|
|
4
13
|
detection?: import('@mui/internal-babel-plugin-minify-errors').Options['detection'];
|
|
5
14
|
};
|
|
15
|
+
/**
|
|
16
|
+
* Extracts error codes from all files in a directory.
|
|
17
|
+
* @param {string[]} files
|
|
18
|
+
* @param {Set<string | Error>} errors
|
|
19
|
+
* @param {import('@mui/internal-babel-plugin-minify-errors').Options['detection']} [detection='opt-in']
|
|
20
|
+
*/
|
|
21
|
+
export declare function extractErrorCodesForFiles(files: string[], errors: Set<string | Error>, detection?: import('@mui/internal-babel-plugin-minify-errors').Options['detection']): Promise<void>;
|
|
6
22
|
/**
|
|
7
23
|
* Extracts error codes from all workspace packages.
|
|
8
24
|
* @param {Args} args
|