@npmcli/template-oss
Advanced tools
Comparing version 3.5.0 to 3.6.0
const fs = require('@npmcli/fs') | ||
const { EOL } = require('os') | ||
const { join, relative } = require('path') | ||
@@ -13,4 +12,4 @@ | ||
const content = await fs.readFile(changelog, { encoding: 'utf8' }) | ||
const mustStart = `# Changelog${EOL}${EOL}#` | ||
if (!content.startsWith(mustStart)) { | ||
const mustStart = /^#\s+Changelog\r?\n\r?\n#/ | ||
if (!mustStart.test(content)) { | ||
return { | ||
@@ -20,3 +19,3 @@ title: `The ${relative(root, changelog)} is incorrect:`, | ||
'The changelog should start with', | ||
`"${mustStart}"`, | ||
`"# Changelog\n\n#"`, | ||
], | ||
@@ -23,0 +22,0 @@ solution: 'reformat the changelog to have the correct heading', |
const log = require('proc-log') | ||
const { EOL } = require('os') | ||
const { resolve, relative, basename } = require('path') | ||
@@ -51,3 +50,3 @@ const fs = require('@npmcli/fs') | ||
.toString() | ||
.split(EOL) | ||
.split(/\r?\n/) | ||
.filter((l) => l && !l.trim().startsWith('#')) | ||
@@ -54,0 +53,0 @@ |
@@ -12,2 +12,3 @@ const { name: NAME, version: LATEST_VERSION } = require('../../package.json') | ||
'.github/dependabot.yml': 'dependabot.yml', | ||
'.github/matchers/tap.json': 'tap.json', | ||
'.github/workflows/audit.yml': 'audit.yml', | ||
@@ -14,0 +15,0 @@ '.github/workflows/codeql-analysis.yml': 'codeql-analysis.yml', |
@@ -21,5 +21,7 @@ const hgi = require('hosted-git-info') | ||
return url.toString() | ||
} catch {} | ||
} catch { | ||
// errors are ignored | ||
} | ||
} | ||
module.exports = getRepo |
const fs = require('@npmcli/fs') | ||
const { EOL } = require('os') | ||
const { basename, extname, dirname } = require('path') | ||
@@ -59,3 +58,3 @@ const yaml = require('yaml') | ||
const header = this.header() | ||
return header ? header + EOL + EOL + s : s | ||
return header ? `${header}\n\n${s}` : s | ||
} | ||
@@ -62,0 +61,0 @@ |
{ | ||
"name": "@npmcli/template-oss", | ||
"version": "3.5.0", | ||
"version": "3.6.0", | ||
"description": "templated files used in npm CLI team oss projects", | ||
@@ -48,3 +48,3 @@ "main": "lib/content/index.js", | ||
"semver": "^7.3.5", | ||
"yaml": "^2.0.0-11" | ||
"yaml": "2.0.0-11" | ||
}, | ||
@@ -51,0 +51,0 @@ "files": [ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
58514
4024
46
1268
+ Addedyaml@2.0.0-11(transitive)
- Removedyaml@2.7.0(transitive)
Updatedyaml@2.0.0-11