We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6aa4805 commit cb07027Copy full SHA for cb07027
scripts/build.js
@@ -23,6 +23,10 @@ if (argv.help) {
23
process.exit(0)
24
}
25
26
+function toSanitizedDirname(name) {
27
+ return name.replace(/[^a-zA-Z0-9-\.]/g, '-').replace(/[-+]/g, '-')
28
+}
29
+
30
const require = createRequire(import.meta.url)
31
32
async function findModuleDir(cwd) {
@@ -201,7 +205,7 @@ if (Object.keys(packageJson.dependencies).length) {
201
205
202
206
203
207
// Create tgz of the build
204
-let tgzFile = `${manifestJson.name}-${manifestJson.version}`
208
+let tgzFile = toSanitizedDirname(`${manifestJson.id}-${manifestJson.version}`)
209
if (typeof argv['output'] === 'string') {
210
// -o flag, to allow legacy behaviour creating pkg.tgz output
211
tgzFile = argv['output']
0 commit comments