@mui/internal-code-infra 0.0.3-canary.88 → 0.0.3-canary.89
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.
|
|
3
|
+
"version": "0.0.3-canary.89",
|
|
4
4
|
"description": "Infra scripts and configs to be used across MUI repos.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -114,8 +114,8 @@
|
|
|
114
114
|
"unified": "^11.0.5",
|
|
115
115
|
"yargs": "^18.0.0",
|
|
116
116
|
"@mui/internal-babel-plugin-display-name": "1.0.4-canary.11",
|
|
117
|
-
"@mui/internal-babel-plugin-
|
|
118
|
-
"@mui/internal-babel-plugin-
|
|
117
|
+
"@mui/internal-babel-plugin-minify-errors": "2.0.8-canary.20",
|
|
118
|
+
"@mui/internal-babel-plugin-resolve-imports": "2.0.7-canary.31"
|
|
119
119
|
},
|
|
120
120
|
"peerDependencies": {
|
|
121
121
|
"@next/eslint-plugin-next": "*",
|
|
@@ -152,7 +152,7 @@
|
|
|
152
152
|
"publishConfig": {
|
|
153
153
|
"access": "public"
|
|
154
154
|
},
|
|
155
|
-
"gitSha": "
|
|
155
|
+
"gitSha": "67eca269ee332f573b258735ece9f448874e2468",
|
|
156
156
|
"scripts": {
|
|
157
157
|
"build": "tsc -p tsconfig.build.json",
|
|
158
158
|
"typescript": "tsc -p tsconfig.json",
|
|
@@ -7,6 +7,9 @@ import fs from 'node:fs/promises';
|
|
|
7
7
|
import os from 'node:os';
|
|
8
8
|
import path from 'node:path';
|
|
9
9
|
|
|
10
|
+
import { findWorkspaceDir } from '@pnpm/find-workspace-dir';
|
|
11
|
+
|
|
12
|
+
import { getRepositoryInfo } from '../utils/git.mjs';
|
|
10
13
|
import { getWorkspacePackages } from '../utils/pnpm.mjs';
|
|
11
14
|
|
|
12
15
|
/**
|
|
@@ -31,6 +34,7 @@ export default /** @type {import('yargs').CommandModule<{}, Args>} */ ({
|
|
|
31
34
|
console.log('No new packages to publish.');
|
|
32
35
|
return;
|
|
33
36
|
}
|
|
37
|
+
const cwd = process.cwd();
|
|
34
38
|
|
|
35
39
|
console.log(`Found ${newPackages.map((pkg) => pkg.name).join(', ')} to publish.`);
|
|
36
40
|
|
|
@@ -42,14 +46,24 @@ export default /** @type {import('yargs').CommandModule<{}, Args>} */ ({
|
|
|
42
46
|
return;
|
|
43
47
|
}
|
|
44
48
|
|
|
49
|
+
const workspaceDir = await findWorkspaceDir(cwd);
|
|
50
|
+
if (!workspaceDir) {
|
|
51
|
+
throw new Error('This command should be run in a workspace.');
|
|
52
|
+
}
|
|
45
53
|
await Promise.all(
|
|
46
54
|
newPackages.map(async (pkg) => {
|
|
47
55
|
const newPkgDir = await fs.mkdtemp(path.join(os.tmpdir(), 'publish-new-package-'));
|
|
48
56
|
try {
|
|
49
57
|
await fs.mkdir(newPkgDir, { recursive: true });
|
|
58
|
+
const repo = await getRepositoryInfo();
|
|
50
59
|
const packageJson = {
|
|
51
60
|
name: pkg.name,
|
|
52
61
|
version: '0.0.1',
|
|
62
|
+
repository: {
|
|
63
|
+
type: 'git',
|
|
64
|
+
url: `git+https://github.com/${repo.owner}/${repo.remoteName}.git`,
|
|
65
|
+
directory: path.relative(workspaceDir, pkg.path).split(path.sep).join('/'),
|
|
66
|
+
},
|
|
53
67
|
};
|
|
54
68
|
await fs.writeFile(
|
|
55
69
|
path.join(newPkgDir, 'package.json'),
|