@npmcli/template-oss 3.4.1 → 3.5.0

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.
@@ -0,0 +1,5 @@
1
+ All interactions in this repo are covered by the [npm Code of
2
+ Conduct](https://docs.npmjs.com/policies/conduct)
3
+
4
+ The npm cli team may, at its own discretion, moderate, remove, or edit
5
+ any interactions such as pull requests, issues, and comments.
@@ -1,3 +1,5 @@
1
+ 'use strict'
2
+
1
3
  const { readdirSync: readdir } = require('fs')
2
4
 
3
5
  const localConfigs = readdir(__dirname)
@@ -31,6 +31,7 @@ const rootModule = {
31
31
  '.gitignore': 'gitignore',
32
32
  '.npmrc': 'npmrc',
33
33
  'SECURITY.md': 'SECURITY.md',
34
+ 'CODE_OF_CONDUCT.md': 'CODE_OF_CONDUCT.md',
34
35
  'package.json': 'pkg.json',
35
36
  },
36
37
  rm: [
@@ -7,5 +7,5 @@
7
7
  {{/if}}
8
8
  - name: Setup git user
9
9
  run: |
10
- git config --global user.email "npm team"
11
- git config --global user.name "ops+robot@npmjs.com"
10
+ git config --global user.email "npm-cli+bot@github.com"
11
+ git config --global user.name "npm CLI robot"
package/lib/util/files.js CHANGED
@@ -4,6 +4,8 @@ const glob = promisify(require('glob'))
4
4
  const Parser = require('./parser.js')
5
5
  const template = require('./template.js')
6
6
 
7
+ const globify = pattern => pattern.split('\\').join('/')
8
+
7
9
  // target paths need to be joinsed with dir and templated
8
10
  const fullTarget = (dir, file, options) => join(dir, template(file, options))
9
11
 
@@ -33,7 +35,7 @@ const getParsers = (dir, files, options) => Object.entries(files).map(([t, s]) =
33
35
  const rmEach = async (dir, files, options, fn) => {
34
36
  const res = []
35
37
  for (const target of files.map((t) => fullTarget(dir, t, options))) {
36
- for (const file of await glob(target, { cwd: dir })) {
38
+ for (const file of await glob(globify(target), { cwd: dir })) {
37
39
  res.push(await fn(file))
38
40
  }
39
41
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@npmcli/template-oss",
3
- "version": "3.4.1",
3
+ "version": "3.5.0",
4
4
  "description": "templated files used in npm CLI team oss projects",
5
5
  "main": "lib/content/index.js",
6
6
  "bin": {
@@ -36,6 +36,7 @@
36
36
  "@npmcli/map-workspaces": "^2.0.2",
37
37
  "@npmcli/package-json": "^2.0.0",
38
38
  "diff": "^5.0.0",
39
+ "glob": "^8.0.1",
39
40
  "handlebars": "^4.7.7",
40
41
  "hosted-git-info": "^5.0.0",
41
42
  "json-parse-even-better-errors": "^2.3.1",