@mui/internal-code-infra 0.0.4-canary.51 → 0.0.4-canary.53
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.
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
export type PublicPackage = import('../utils/pnpm.mjs').PublicPackage;
|
|
3
3
|
export type Args = {
|
|
4
4
|
publicOnly?: boolean;
|
|
5
|
-
output?: 'json' | 'path' | 'name'
|
|
5
|
+
output?: 'json' | 'path' | 'name';
|
|
6
6
|
sinceRef?: string;
|
|
7
7
|
filter?: string[];
|
|
8
8
|
};
|
|
9
9
|
/**
|
|
10
10
|
* @typedef {Object} Args
|
|
11
11
|
* @property {boolean} [publicOnly] - Whether to filter to only public packages
|
|
12
|
-
* @property {'json'|'path'|'name'
|
|
12
|
+
* @property {'json'|'path'|'name'} [output] - Output format (name, path, or json)
|
|
13
13
|
* @property {string} [sinceRef] - Git reference to filter changes since
|
|
14
14
|
* @property {string[]} [filter] - Same as filtering packages with --filter in pnpm. Only include packages matching the filter. See https://pnpm.io/filtering.
|
|
15
15
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mui/internal-code-infra",
|
|
3
|
-
"version": "0.0.4-canary.
|
|
3
|
+
"version": "0.0.4-canary.53",
|
|
4
4
|
"author": "MUI Team",
|
|
5
5
|
"description": "Infra scripts and configs to be used across MUI repos.",
|
|
6
6
|
"license": "MIT",
|
|
@@ -139,9 +139,9 @@
|
|
|
139
139
|
"unified-lint-rule": "^3.0.1",
|
|
140
140
|
"unist-util-visit": "^5.1.0",
|
|
141
141
|
"yargs": "^18.0.0",
|
|
142
|
-
"@mui/internal-babel-plugin-minify-errors": "2.0.8-canary.27",
|
|
143
142
|
"@mui/internal-babel-plugin-display-name": "1.0.4-canary.20",
|
|
144
|
-
"@mui/internal-babel-plugin-resolve-imports": "2.0.7-canary.36"
|
|
143
|
+
"@mui/internal-babel-plugin-resolve-imports": "2.0.7-canary.36",
|
|
144
|
+
"@mui/internal-babel-plugin-minify-errors": "2.0.8-canary.27"
|
|
145
145
|
},
|
|
146
146
|
"peerDependencies": {
|
|
147
147
|
"@next/eslint-plugin-next": "*",
|
|
@@ -191,7 +191,7 @@
|
|
|
191
191
|
"publishConfig": {
|
|
192
192
|
"access": "public"
|
|
193
193
|
},
|
|
194
|
-
"gitSha": "
|
|
194
|
+
"gitSha": "b4ed2d73599b0cef4b7e90c88e1e4d8163c670e8",
|
|
195
195
|
"scripts": {
|
|
196
196
|
"build": "tsgo -p tsconfig.build.json",
|
|
197
197
|
"typescript": "tsgo -noEmit",
|
|
@@ -6,14 +6,12 @@
|
|
|
6
6
|
* @typedef {import('../utils/pnpm.mjs').PublicPackage} PublicPackage
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
-
import * as fs from 'node:fs/promises';
|
|
10
|
-
import * as path from 'node:path';
|
|
11
9
|
import { getWorkspacePackages } from '../utils/pnpm.mjs';
|
|
12
10
|
|
|
13
11
|
/**
|
|
14
12
|
* @typedef {Object} Args
|
|
15
13
|
* @property {boolean} [publicOnly] - Whether to filter to only public packages
|
|
16
|
-
* @property {'json'|'path'|'name'
|
|
14
|
+
* @property {'json'|'path'|'name'} [output] - Output format (name, path, or json)
|
|
17
15
|
* @property {string} [sinceRef] - Git reference to filter changes since
|
|
18
16
|
* @property {string[]} [filter] - Same as filtering packages with --filter in pnpm. Only include packages matching the filter. See https://pnpm.io/filtering.
|
|
19
17
|
*/
|
|
@@ -30,10 +28,10 @@ export default /** @type {import('yargs').CommandModule<{}, Args>} */ ({
|
|
|
30
28
|
})
|
|
31
29
|
.option('output', {
|
|
32
30
|
type: 'string',
|
|
33
|
-
choices: ['json', 'path', 'name'
|
|
31
|
+
choices: ['json', 'path', 'name'],
|
|
34
32
|
default: 'path',
|
|
35
33
|
description:
|
|
36
|
-
'Output format: name (package names), path (package paths),
|
|
34
|
+
'Output format: name (package names), path (package paths), or json (full JSON)',
|
|
37
35
|
})
|
|
38
36
|
.option('since-ref', {
|
|
39
37
|
type: 'string',
|
|
@@ -60,26 +58,6 @@ export default /** @type {import('yargs').CommandModule<{}, Args>} */ ({
|
|
|
60
58
|
packages.forEach((pkg) => {
|
|
61
59
|
console.log(pkg.path);
|
|
62
60
|
});
|
|
63
|
-
} else if (output === 'publish-dir') {
|
|
64
|
-
// TODO: Remove this option once https://github.com/stackblitz-labs/pkg.pr.new/issues/389 is resolved
|
|
65
|
-
// Print publish directories (package.json publishConfig.directory or package path)
|
|
66
|
-
const publishDirs = await Promise.all(
|
|
67
|
-
packages.map(async (pkg) => {
|
|
68
|
-
const packageJsonPath = path.join(pkg.path, 'package.json');
|
|
69
|
-
const packageJsonContent = await fs.readFile(packageJsonPath, 'utf8');
|
|
70
|
-
const packageJson = JSON.parse(packageJsonContent);
|
|
71
|
-
|
|
72
|
-
if (packageJson.publishConfig?.directory) {
|
|
73
|
-
return path.join(pkg.path, packageJson.publishConfig.directory);
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
return pkg.path;
|
|
77
|
-
}),
|
|
78
|
-
);
|
|
79
|
-
|
|
80
|
-
publishDirs.forEach((dir) => {
|
|
81
|
-
console.log(dir);
|
|
82
|
-
});
|
|
83
61
|
} else if (output === 'name') {
|
|
84
62
|
// Print package names (default)
|
|
85
63
|
packages.forEach((pkg) => {
|
|
@@ -18,15 +18,14 @@ import { getTransitiveDependencies, getWorkspacePackages } from '../utils/pnpm.m
|
|
|
18
18
|
/**
|
|
19
19
|
* Generate the ignore command string for netlify.toml.
|
|
20
20
|
*
|
|
21
|
-
* Production
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
* touch the watched paths.
|
|
21
|
+
* Production and branch deploys (every Netlify $CONTEXT other than
|
|
22
|
+
* "deploy-preview") always build, so downstream plugins (e.g. e2e triggers)
|
|
23
|
+
* run on every deploy and catch regressions in external dependencies even
|
|
24
|
+
* when the commit doesn't touch the watched paths.
|
|
26
25
|
*
|
|
27
|
-
*
|
|
28
|
-
* merge-base with origin/<baseBranch>. This way a PR rebase whose
|
|
29
|
-
* commit doesn't touch the watched paths still rebuilds when the PR as a
|
|
26
|
+
* Only deploy-previews (PR previews) are eligible to be skipped: they diff
|
|
27
|
+
* against the merge-base with origin/<baseBranch>. This way a PR rebase whose
|
|
28
|
+
* head commit doesn't touch the watched paths still rebuilds when the PR as a
|
|
30
29
|
* whole introduces changes to them — otherwise downstream plugins silently
|
|
31
30
|
* never run.
|
|
32
31
|
*
|
|
@@ -39,7 +38,7 @@ import { getTransitiveDependencies, getWorkspacePackages } from '../utils/pnpm.m
|
|
|
39
38
|
function generateIgnoreCommand(paths, packagePath, workspaceRoot, baseBranch) {
|
|
40
39
|
const relFromBase = `${toPosixPath(path.relative(packagePath, workspaceRoot))}/`;
|
|
41
40
|
const pathsStr = paths.join(' ');
|
|
42
|
-
return ` ignore = """cd ${relFromBase} && [ "$CONTEXT"
|
|
41
|
+
return ` ignore = """cd ${relFromBase} && [ "$CONTEXT" = "deploy-preview" ] && git fetch origin ${baseBranch} --depth=500 -q && git diff --quiet FETCH_HEAD...$COMMIT_REF -- ${pathsStr}"""`;
|
|
43
42
|
}
|
|
44
43
|
|
|
45
44
|
/**
|
|
@@ -113,7 +112,7 @@ export default /** @type {import('yargs').CommandModule<{}, Args>} */ ({
|
|
|
113
112
|
type: 'string',
|
|
114
113
|
default: 'master',
|
|
115
114
|
describe:
|
|
116
|
-
"Branch to compare PRs against (the site's production branch on Netlify). Production
|
|
115
|
+
"Branch to compare PRs against (the site's production branch on Netlify). Production and branch deploys always rebuild regardless of this value.",
|
|
117
116
|
})
|
|
118
117
|
.example('$0 netlify-ignore @mui/internal-docs-infra', 'Update netlify.toml for a workspace')
|
|
119
118
|
.example(
|