@npmcli/template-oss 3.4.0 → 3.4.3
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/lib/content/eslintrc.js
CHANGED
package/lib/content/gitignore
CHANGED
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.
|
|
3
|
+
"version": "3.4.3",
|
|
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",
|