diff --git a/index.js b/index.js index 590eace3..cd4c8b4c 100644 --- a/index.js +++ b/index.js @@ -1,6 +1,7 @@ import { castArray, defaultTo } from "lodash-es"; +import os from "os"; +import path from "path"; import AggregateError from "aggregate-error"; -import { temporaryFile } from "tempy"; import getPkg from "./lib/get-pkg.js"; import verifyNpmConfig from "./lib/verify-config.js"; import verifyNpmAuth from "./lib/verify-auth.js"; @@ -10,7 +11,10 @@ import publishNpm from "./lib/publish.js"; let verified; let prepared; -const npmrc = temporaryFile({ name: ".npmrc" }); + +const tempDir = os.tmpdir(); + +const npmrc = path.join(tempDir, ".npmrc"); export async function verifyConditions(pluginConfig, context) { // If the npm publish plugin is used and has `npmPublish`, `tarballDir` or `pkgRoot` configured, validate them now in order to prevent any release if the configuration is wrong diff --git a/package-lock.json b/package-lock.json index 31d0a73c..565e111a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -20,8 +20,7 @@ "rc": "^1.2.8", "read-pkg": "^9.0.0", "registry-auth-token": "^5.0.0", - "semver": "^7.1.2", - "tempy": "^3.0.0" + "semver": "^7.1.2" }, "devDependencies": { "ava": "6.2.0", @@ -3316,6 +3315,7 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/crypto-random-string/-/crypto-random-string-4.0.0.tgz", "integrity": "sha512-x8dy3RnvYdlUcPOjkEHqozhiwzKNSq7GcPuXFbnyMOCHxX8V3OgIg/pYuabl2sbUPfIJaeAQB7PMOK8DFIdoRA==", + "dev": true, "license": "MIT", "dependencies": { "type-fest": "^1.0.1" @@ -3331,6 +3331,7 @@ "version": "1.4.0", "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-1.4.0.tgz", "integrity": "sha512-yGSza74xk0UG8k+pLh5oeoYirvIiWo5t0/o3zHHAO2tRDiZcxWP7fywNlXhqb6/r6sWvwi+RsyQMWhVLe4BVuA==", + "dev": true, "license": "(MIT OR CC0-1.0)", "engines": { "node": ">=10" @@ -13415,6 +13416,7 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/temp-dir/-/temp-dir-3.0.0.tgz", "integrity": "sha512-nHc6S/bwIilKHNRgK/3jlhDoIHcp45YgyiwcAk46Tr0LfEqGBVpmiAyuiuxeVE44m3mXnEeVhaipLOEWmH+Njw==", + "dev": true, "license": "MIT", "engines": { "node": ">=14.16" @@ -13424,6 +13426,7 @@ "version": "3.1.0", "resolved": "https://registry.npmjs.org/tempy/-/tempy-3.1.0.tgz", "integrity": "sha512-7jDLIdD2Zp0bDe5r3D2qtkd1QOCacylBuL7oa4udvN6v2pqr4+LcCr67C8DR1zkpaZ8XosF5m1yQSabKAW6f2g==", + "dev": true, "license": "MIT", "dependencies": { "is-stream": "^3.0.0", @@ -13442,6 +13445,7 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-3.0.0.tgz", "integrity": "sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA==", + "dev": true, "license": "MIT", "engines": { "node": "^12.20.0 || ^14.13.1 || >=16.0.0" @@ -13454,6 +13458,7 @@ "version": "2.19.0", "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-2.19.0.tgz", "integrity": "sha512-RAH822pAdBgcNMAfWnCBU3CFZcfZ/i1eZjwFU/dsLKumyuuP3niueg2UAukXYF0E2AAoc82ZSSf9J0WQBinzHA==", + "dev": true, "license": "(MIT OR CC0-1.0)", "engines": { "node": ">=12.20" @@ -13980,6 +13985,7 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/unique-string/-/unique-string-3.0.0.tgz", "integrity": "sha512-VGXBUVwxKMBUznyffQweQABPRRW1vHZAbadFZud4pLFAqRGvv/96vafgjWFqzourzr8YonlQiPgH0YCJfawoGQ==", + "dev": true, "license": "MIT", "dependencies": { "crypto-random-string": "^4.0.0" diff --git a/package.json b/package.json index 584c4bbe..221c1497 100644 --- a/package.json +++ b/package.json @@ -30,8 +30,7 @@ "rc": "^1.2.8", "read-pkg": "^9.0.0", "registry-auth-token": "^5.0.0", - "semver": "^7.1.2", - "tempy": "^3.0.0" + "semver": "^7.1.2" }, "devDependencies": { "ava": "6.2.0",