pkg-pr-new 0.0.12 → 0.0.14

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/index.ts CHANGED
@@ -60,7 +60,11 @@ const main = defineCommand({
60
60
  },
61
61
  run: async ({ args }) => {
62
62
  const paths = (args._.length ? args._ : ["."])
63
- .flatMap((p) => (fg.isDynamicPattern(p) ? fg.sync(p) : p))
63
+ .flatMap((p) =>
64
+ fg.isDynamicPattern(p)
65
+ ? fg.sync(p, { onlyDirectories: true })
66
+ : p,
67
+ )
64
68
  .map((p) => path.resolve(p.trim()));
65
69
 
66
70
  const templates = (
@@ -68,7 +72,11 @@ const main = defineCommand({
68
72
  ? [args.template]
69
73
  : ([...(args.template || [])] as string[])
70
74
  )
71
- .flatMap((p) => (fg.isDynamicPattern(p) ? fg.sync(p) : p))
75
+ .flatMap((p) =>
76
+ fg.isDynamicPattern(p)
77
+ ? fg.sync(p, { onlyDirectories: true })
78
+ : p,
79
+ )
72
80
  .map((p) => path.resolve(p.trim()));
73
81
 
74
82
  const formData = new FormData();
@@ -163,12 +171,6 @@ const main = defineCommand({
163
171
  if (!pJson.name) {
164
172
  throw new Error(`"name" field in ${pJsonPath} should be defined`);
165
173
  }
166
- if (pJson.private) {
167
- console.log(
168
- `skipping ${templateDir} because the package is private`,
169
- );
170
- continue;
171
- }
172
174
 
173
175
  console.log("preparing template:", pJson.name);
174
176
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pkg-pr-new",
3
- "version": "0.0.12",
3
+ "version": "0.0.14",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "type": "module",
package/template.ts CHANGED
@@ -28,7 +28,7 @@ npm i ${url}
28
28
  To use this feature as a maintainer, you can run the following command:
29
29
 
30
30
  \`\`\`sh
31
- npx pkg-pr-new publish ./packages/A --template ./examples/*
31
+ npx pkg-pr-new publish ./packages/A --template="./examples/*"
32
32
  \`\`\`
33
33
 
34
34
  ## Benefits