build-strap 4.0.0-dev.1 → 4.0.0-dev.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.
- package/npm.d.ts +0 -1
- package/npm.js +2 -2
- package/package.json +1 -1
package/npm.d.ts
CHANGED
|
@@ -22,7 +22,6 @@ export interface NpmPublishOptions {
|
|
|
22
22
|
skipExisting?: boolean;
|
|
23
23
|
tag?: string;
|
|
24
24
|
workDir?: string;
|
|
25
|
-
writeNpmrc?: boolean;
|
|
26
25
|
}
|
|
27
26
|
export declare function npmPublish({ npmAuthToken, npmConfig, npmCreds, npmPath, publishPath, skipExisting, tag, workDir: passedWorkDir, }?: NpmPublishOptions): Promise<boolean>;
|
|
28
27
|
interface NpmPackOptions {
|
package/npm.js
CHANGED
|
@@ -15,7 +15,7 @@ export async function npmExec(args, npmPath) {
|
|
|
15
15
|
}
|
|
16
16
|
export async function npmGetVersions(packageName, npmPath) {
|
|
17
17
|
try {
|
|
18
|
-
return JSON.parse(await npmExec(['show', packageName, 'versions'], npmPath));
|
|
18
|
+
return JSON.parse((await npmExec(['show', packageName, 'versions', '--json'], npmPath)).trim());
|
|
19
19
|
}
|
|
20
20
|
catch (err) {
|
|
21
21
|
buildLog(`warning: failed to find existing package for ${packageName} in npm registry: ${err.message}`);
|
|
@@ -46,7 +46,7 @@ export async function npmPublish({ npmAuthToken, npmConfig, npmCreds, npmPath, p
|
|
|
46
46
|
const [, host] = /^(?:http(?:s)?:\/\/)?(.+)$/.exec(theRegistry) || [];
|
|
47
47
|
await fs.mkdirp(workDir);
|
|
48
48
|
await fs.writeFile(path.join(workDir, '.npmrc'), `registry=${theRegistry}
|
|
49
|
-
${authToken ? `//${host}:_authToken
|
|
49
|
+
${authToken ? `//${host}:_authToken=\${NPM_TOKEN}` : ''}
|
|
50
50
|
${creds
|
|
51
51
|
? `_auth=${Buffer.from(`${creds.username}:${creds.password}`).toString('base64')}
|
|
52
52
|
always-auth=true
|