@leverege/build-tools 2.90.0 → 2.90.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leverege/build-tools",
3
- "version": "2.90.0",
3
+ "version": "2.90.1",
4
4
  "description": "A collection of build / support tools for Leverege developers",
5
5
  "main": "index.js",
6
6
  "repository": {
@@ -1,4 +1,4 @@
1
- #!/usr/bin/env node
1
+ #!/usr/bin/env node --trace-deprecation
2
2
  /*
3
3
  * refresh-npm-token will check the access time of the $HOME/.npmrc npm token
4
4
  * file and if it is older than 24 hours then it will be updated to whatever
@@ -228,11 +228,12 @@ try {
228
228
  if ( args.dryRun ) {
229
229
  log( chalk.yellow( '\n*** Dry Run - files will not be updated' ) )
230
230
  } else {
231
+ const { filename } = npmrc
231
232
  log( chalk.yellow( '\n*** Refreshing your ~/.npmrc npm token file' ) )
232
- if ( fs.existsSync( npmrc ) ) {
233
- fs.copyFileSync( npmrc, `${npmrc}-BAK` ) // make a backup for safety
233
+ if ( fs.existsSync( filename ) ) {
234
+ fs.copyFileSync( filename, `${filename}-BAK` ) // make a backup for safety
234
235
  }
235
- fs.writeFileSync( npmrc.filename, npmrcFile )
236
+ fs.writeFileSync( filename, npmrcFile )
236
237
  }
237
238
  } catch ( fileErr ) {
238
239
  log( fileErr, 'fs failed' )