@npmcli/template-oss
Advanced tools
Comparing version 3.2.0 to 3.2.1
@@ -21,3 +21,3 @@ const fs = require('@npmcli/fs') | ||
), | ||
when: ({ config: c }) => c.isForce || (c.needsUpdate && c.applyRepo), | ||
when: ({ config: c }) => c.applyRepo && c.needsUpdate, | ||
name: 'apply-repo', | ||
@@ -30,4 +30,4 @@ }, { | ||
), | ||
when: ({ config: c }) => c.isForce || (c.needsUpdate && c.applyModule), | ||
when: ({ config: c }) => c.applyModule && c.needsUpdate, | ||
name: 'apply-module', | ||
}] |
@@ -5,2 +5,3 @@ const run = require('../index.js') | ||
require('./apply-files.js'), | ||
require('./apply-version.js'), | ||
]) |
@@ -59,2 +59,3 @@ const { relative, dirname, posix, win32 } = require('path') | ||
const isDogFood = pkg.name === NAME | ||
const isForce = process.argv.includes('--force') | ||
@@ -115,7 +116,9 @@ // this is written to ci yml files so it needs to always use posix | ||
pkgRelPath: pkgRelPath, | ||
// force changes if we are dogfooding this repo or with force argv | ||
// XXX: setup proper cli arg parsing | ||
isForce: isDogFood || process.argv.includes('--force'), | ||
// booleans to control application of updates | ||
isForce, | ||
isDogFood, | ||
isLatest, | ||
needsUpdate: !isLatest, | ||
// needs update if we are dogfooding this repo, with force argv, or its | ||
// behind the current version | ||
needsUpdate: isForce || isDogFood || !isLatest, | ||
// templateoss specific values | ||
@@ -125,3 +128,2 @@ __NAME__: NAME, | ||
__VERSION__: LATEST_VERSION, | ||
__DOGFOOD__: isDogFood, | ||
} | ||
@@ -128,0 +130,0 @@ |
@@ -8,2 +8,3 @@ const { readdirSync: readdir } = require('fs') | ||
module.exports = { | ||
root: true, | ||
extends: [ | ||
@@ -10,0 +11,0 @@ '@npmcli', |
@@ -56,2 +56,3 @@ const { name: NAME, version: LATEST_VERSION } = require('../../package.json') | ||
'.eslintrc.!(js|local.*)', | ||
'SECURITY.md', | ||
], | ||
@@ -58,0 +59,0 @@ } |
@@ -23,3 +23,3 @@ { | ||
{{{json __CONFIG_KEY__}}}: { | ||
"version": {{#if __DOGFOOD__}}{{{del}}}{{else}}{{{json __VERSION__}}}{{/if}} | ||
"version": {{#if isDogFood}}{{{del}}}{{else}}{{{json __VERSION__}}}{{/if}} | ||
}, | ||
@@ -26,0 +26,0 @@ "templateVersion": {{{del}}}, |
{ | ||
"name": "@npmcli/template-oss", | ||
"version": "3.2.0", | ||
"version": "3.2.1", | ||
"description": "templated files used in npm CLI team oss projects", | ||
@@ -5,0 +5,0 @@ "main": "lib/content/index.js", |
55271
44
1201