@vitejs/release-scripts 1.3.0 → 1.3.2

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 (2) hide show
  1. package/dist/index.js +12 -18
  2. package/package.json +17 -12
package/dist/index.js CHANGED
@@ -107,6 +107,9 @@ async function publishPackage(pkgDir, tag, provenance, packageManager = "npm") {
107
107
  if (provenance) {
108
108
  publicArgs.push(`--provenance`);
109
109
  }
110
+ if (packageManager === "pnpm") {
111
+ publicArgs.push(`--no-git-checks`);
112
+ }
110
113
  await runIfNotDry(packageManager, publicArgs, {
111
114
  cwd: pkgDir
112
115
  });
@@ -115,8 +118,7 @@ async function getActiveVersion(npmName) {
115
118
  try {
116
119
  return (await run("npm", ["info", npmName, "version"], { stdio: "pipe" })).stdout;
117
120
  } catch (e) {
118
- if (e.stderr.startsWith("npm ERR! code E404"))
119
- return;
121
+ if (e.stderr.startsWith("npm ERR! code E404")) return;
120
122
  throw e;
121
123
  }
122
124
  }
@@ -129,16 +131,12 @@ var publish = async ({
129
131
  packageManager
130
132
  }) => {
131
133
  const tag = args._[0];
132
- if (!tag)
133
- throw new Error("No tag specified");
134
+ if (!tag) throw new Error("No tag specified");
134
135
  let pkgName = defaultPackage;
135
136
  let version;
136
- if (tag.includes("@"))
137
- [pkgName, version] = tag.split("@");
138
- else
139
- version = tag;
140
- if (version.startsWith("v"))
141
- version = version.slice(1);
137
+ if (tag.includes("@")) [pkgName, version] = tag.split("@");
138
+ else version = tag;
139
+ if (version.startsWith("v")) version = version.slice(1);
142
140
  const { pkg, pkgDir } = getPackageInfo(pkgName, getPkgDir);
143
141
  if (pkg.version !== version)
144
142
  throw new Error(
@@ -171,21 +169,18 @@ var release = async ({
171
169
  message: "Select package",
172
170
  choices: packages.map((i) => ({ value: i, title: i }))
173
171
  })).pkg;
174
- if (!selectedPkg)
175
- return;
172
+ if (!selectedPkg) return;
176
173
  await logChangelog(selectedPkg);
177
174
  const { pkg, pkgPath, pkgDir } = getPackageInfo(selectedPkg, getPkgDir);
178
175
  const { messages } = await publint({ pkgDir });
179
176
  if (messages.length) {
180
- for (const message of messages)
181
- console.log(formatMessage(message, pkg));
177
+ for (const message of messages) console.log(formatMessage(message, pkg));
182
178
  const { yes: yes2 } = await prompts({
183
179
  type: "confirm",
184
180
  name: "yes",
185
181
  message: `${messages.length} messages from publint. Continue anyway?`
186
182
  });
187
- if (!yes2)
188
- process.exit(1);
183
+ if (!yes2) process.exit(1);
189
184
  }
190
185
  if (!targetVersion) {
191
186
  const { release: release2 } = await prompts({
@@ -221,8 +216,7 @@ var release = async ({
221
216
  name: "yes",
222
217
  message: `Releasing ${colors2.yellow(tag)} Confirm?`
223
218
  });
224
- if (!yes)
225
- return;
219
+ if (!yes) return;
226
220
  step("\nUpdating package version...");
227
221
  updateVersion(pkgPath, targetVersion);
228
222
  await generateChangelog(selectedPkg, targetVersion);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vitejs/release-scripts",
3
- "version": "1.3.0",
3
+ "version": "1.3.2",
4
4
  "description": "@vitejs release scripts",
5
5
  "license": "MIT",
6
6
  "main": "dist/index.js",
@@ -14,6 +14,10 @@
14
14
  "import": "./dist/index.js"
15
15
  }
16
16
  },
17
+ "repository": {
18
+ "type": "git",
19
+ "url": "git+https://github.com/vitejs/release-scripts.git"
20
+ },
17
21
  "scripts": {
18
22
  "build": "tnode scripts/build.ts",
19
23
  "prettier": "pnpm prettier-ci --write",
@@ -24,18 +28,19 @@
24
28
  "dependencies": {
25
29
  "execa": "^8.0.1",
26
30
  "mri": "^1.2.0",
27
- "picocolors": "^1.0.0",
31
+ "picocolors": "^1.0.1",
28
32
  "prompts": "^2.4.2",
29
- "publint": "^0.2.2",
30
- "semver": "^7.5.4"
33
+ "publint": "^0.2.9",
34
+ "semver": "^7.6.3"
31
35
  },
32
36
  "devDependencies": {
33
- "@arnaud-barre/tnode": "^0.19.1",
34
- "@types/node": "^18.17.14",
35
- "@types/prompts": "^2.4.4",
36
- "@types/semver": "^7.5.1",
37
- "esbuild": "^0.19.2",
38
- "prettier": "^3.0.3",
39
- "typescript": "^5.2.2"
40
- }
37
+ "@arnaud-barre/tnode": "^0.19.2",
38
+ "@types/node": "^20.14.13",
39
+ "@types/prompts": "^2.4.9",
40
+ "@types/semver": "^7.5.8",
41
+ "esbuild": "^0.23.0",
42
+ "prettier": "^3.3.3",
43
+ "typescript": "^5.5.4"
44
+ },
45
+ "packageManager": "pnpm@9.6.0"
41
46
  }