zx-bulk-release 1.7.1 → 1.7.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/CHANGELOG.md CHANGED
@@ -1,3 +1,8 @@
1
+ ## [1.7.2](https://github.com/semrel-extra/zx-bulk-release/compare/v1.7.1...v1.7.2) (2022-06-25)
2
+
3
+ ### Fixes & improvements
4
+ * fix: fix npm token path for npm fetching ([33e9b59](https://github.com/semrel-extra/zx-bulk-release/commit/33e9b599f77e0fc77d8964df9da6df2a75e9d227))
5
+
1
6
  ## [1.7.1](https://github.com/semrel-extra/zx-bulk-release/compare/v1.7.0...v1.7.1) (2022-06-25)
2
7
 
3
8
  ### Fixes & improvements
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zx-bulk-release",
3
- "version": "1.7.1",
3
+ "version": "1.7.2",
4
4
  "description": "zx-based alternative for multi-semantic-release",
5
5
  "type": "module",
6
6
  "exports": "./src/main/js/index.js",
@@ -32,10 +32,11 @@ export const build = (pkg, packages) => ctx(async ($) => {
32
32
  const fetchPkg = (pkg) => ctx(async ($) => {
33
33
  try {
34
34
  const cwd = pkg.absPath
35
- const {npmRegistry} = parseEnv($.env)
35
+ const {npmRegistry, npmToken, npmConfig} = parseEnv($.env)
36
36
  const temp = tempy.temporaryDirectory()
37
- const npmrc = ini.parse(await fs.readFile(`${cwd}/.npmrc`, 'utf8'))
38
- const token = getAuthToken(npmRegistry, npmrc)
37
+ const token = npmToken
38
+ ? npmToken
39
+ : getAuthToken(npmRegistry, ini.parse(await fs.readFile(npmConfig, 'utf8')))
39
40
  const auth = `Authorization: Bearer ${token}`
40
41
  const tarball = getTarballUrl(npmRegistry, pkg.name, pkg.version)
41
42