@mui/internal-code-infra 0.0.3-canary.18 โ†’ 0.0.3-canary.19

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mui/internal-code-infra",
3
- "version": "0.0.3-canary.18",
3
+ "version": "0.0.3-canary.19",
4
4
  "description": "Infra scripts and configs to be used across MUI repos.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -65,8 +65,8 @@
65
65
  "typescript-eslint": "^8.44.1",
66
66
  "yargs": "^18.0.0",
67
67
  "@mui/internal-babel-plugin-display-name": "1.0.4-canary.7",
68
- "@mui/internal-babel-plugin-resolve-imports": "2.0.7-canary.22",
69
- "@mui/internal-babel-plugin-minify-errors": "2.0.8-canary.10"
68
+ "@mui/internal-babel-plugin-minify-errors": "2.0.8-canary.10",
69
+ "@mui/internal-babel-plugin-resolve-imports": "2.0.7-canary.22"
70
70
  },
71
71
  "peerDependencies": {
72
72
  "eslint": "^9.0.0",
@@ -97,7 +97,7 @@
97
97
  "publishConfig": {
98
98
  "access": "public"
99
99
  },
100
- "gitSha": "6c7f0fe7159ec6c1a5e09724bc1f0855e1e76c34",
100
+ "gitSha": "92a027f21a6b0cdafed5abd806f7adab158d03a0",
101
101
  "scripts": {
102
102
  "typescript": "tsc -p tsconfig.json",
103
103
  "test": "pnpm -w test --project @mui/internal-code-infra",
@@ -23,6 +23,7 @@ function getOctokit() {
23
23
  * @typedef {Object} Args
24
24
  * @property {boolean} dry-run Run in dry-run mode without publishing
25
25
  * @property {boolean} github-release Create a GitHub draft release after publishing
26
+ * @property {string} tag NPM dist tag to publish to
26
27
  */
27
28
 
28
29
  /**
@@ -221,7 +222,7 @@ async function publishToNpm(packages, options) {
221
222
  });
222
223
 
223
224
  // Use pnpm's built-in duplicate checking - no need to check versions ourselves
224
- await publishPackages(packages, 'latest', options);
225
+ await publishPackages(packages, options);
225
226
  console.log('โœ… Successfully published to npm');
226
227
  }
227
228
 
@@ -268,10 +269,15 @@ export default /** @type {import('yargs').CommandModule<{}, Args>} */ ({
268
269
  type: 'boolean',
269
270
  default: false,
270
271
  description: 'Create a GitHub draft release after publishing',
272
+ })
273
+ .option('tag', {
274
+ type: 'string',
275
+ default: 'latest',
276
+ description: 'NPM dist tag to publish to',
271
277
  });
272
278
  },
273
279
  handler: async (argv) => {
274
- const { dryRun = false, githubRelease = false } = argv;
280
+ const { dryRun = false, githubRelease = false, tag = 'latest' } = argv;
275
281
 
276
282
  if (dryRun) {
277
283
  console.log('๐Ÿงช Running in DRY RUN mode - no actual publishing will occur\n');
@@ -303,7 +309,7 @@ export default /** @type {import('yargs').CommandModule<{}, Args>} */ ({
303
309
 
304
310
  // Publish to npm (pnpm handles duplicate checking automatically)
305
311
  // No git checks, we'll do our own
306
- await publishToNpm(allPackages, { dryRun, noGitChecks: true });
312
+ await publishToNpm(allPackages, { dryRun, noGitChecks: true, tag });
307
313
 
308
314
  await createGitTag(version, dryRun);
309
315
 
@@ -151,7 +151,7 @@ async function publishCanaryVersions(
151
151
  let publishSuccess = false;
152
152
  try {
153
153
  console.log(`๐Ÿ“ค Publishing ${packagesToPublish.length} canary versions...`);
154
- await publishPackages(packagesToPublish, 'canary', { ...options, noGitChecks: true });
154
+ await publishPackages(packagesToPublish, { ...options, noGitChecks: true, tag: 'canary' });
155
155
 
156
156
  packagesToPublish.forEach((pkg) => {
157
157
  const canaryVersion = canaryVersions.get(pkg.name);
package/src/cli/pnpm.mjs CHANGED
@@ -31,6 +31,7 @@ import * as semver from 'semver';
31
31
  * @typedef {Object} PublishOptions
32
32
  * @property {boolean} [dryRun] - Whether to run in dry-run mode
33
33
  * @property {boolean} [noGitChecks] - Whether to skip git checks
34
+ * @property {string} [tag] - NPM dist tag to publish to
34
35
  */
35
36
 
36
37
  /**
@@ -129,12 +130,12 @@ export async function getPackageVersionInfo(packageName, baseVersion) {
129
130
  /**
130
131
  * Publish packages with the given options
131
132
  * @param {PublicPackage[]} packages - Packages to publish
132
- * @param {string} tag - npm tag to publish with
133
133
  * @param {PublishOptions} [options={}] - Publishing options
134
134
  * @returns {Promise<void>}
135
135
  */
136
- export async function publishPackages(packages, tag, options = {}) {
136
+ export async function publishPackages(packages, options = {}) {
137
137
  const args = [];
138
+ const tag = options.tag ?? 'latest';
138
139
 
139
140
  // Add package filters
140
141
  packages.forEach((pkg) => {