pkg-pr-new 0.0.29 → 0.0.30

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.
Files changed (3) hide show
  1. package/dist/index.js +8 -14
  2. package/index.ts +5 -20
  3. package/package.json +2 -2
package/index.ts CHANGED
@@ -90,7 +90,7 @@ const main = defineCommand({
90
90
  },
91
91
  },
92
92
  run: async ({ args }) => {
93
- const paths = args._.length
93
+ const paths = args._.length > 0
94
94
  ? await glob(args._, {
95
95
  expandDirectories: false,
96
96
  onlyDirectories: true,
@@ -98,28 +98,12 @@ const main = defineCommand({
98
98
  })
99
99
  : [process.cwd()];
100
100
 
101
- if (args._.includes(".") || args._.includes("./")) {
102
- paths.push(process.cwd());
103
- }
104
-
105
- const templatePatterns =
106
- typeof args.template === "string"
107
- ? [args.template]
108
- : ([...(args.template || [])] as string[]);
109
-
110
- const templates = await glob(templatePatterns, {
101
+ const templates = await glob(args.template ?? [], {
111
102
  expandDirectories: false,
112
103
  onlyDirectories: true,
113
104
  absolute: true,
114
105
  });
115
106
 
116
- if (
117
- templatePatterns.includes(".") ||
118
- templatePatterns.includes("./")
119
- ) {
120
- templates.push(process.cwd());
121
- }
122
-
123
107
  const formData = new FormData();
124
108
 
125
109
  const isCompact = !!args.compact;
@@ -131,7 +115,7 @@ const main = defineCommand({
131
115
 
132
116
  if (!process.env.TEST && process.env.GITHUB_ACTIONS !== "true") {
133
117
  console.error(
134
- "Continuous Releases are only available in Github Actions.",
118
+ "Continuous Releases are only available in GitHub Actions.",
135
119
  );
136
120
  process.exit(1);
137
121
  }
@@ -448,6 +432,7 @@ const main = defineCommand({
448
432
  }
449
433
 
450
434
  const packageManager = await detect();
435
+ const agent = packageManager.agent.includes('@') ? packageManager.agent.split('@')[0] : packageManager.agent;
451
436
  const res = await fetch(publishUrl, {
452
437
  method: "POST",
453
438
  headers: {
@@ -456,7 +441,7 @@ const main = defineCommand({
456
441
  "sb-key": key,
457
442
  "sb-shasums": JSON.stringify(shasums),
458
443
  "sb-run-id": GITHUB_RUN_ID,
459
- "sb-package-manager": packageManager.agent ?? "npm",
444
+ "sb-package-manager": agent ?? "npm",
460
445
  "sb-only-templates": `${isOnlyTemplates}`,
461
446
  },
462
447
  body: formData,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pkg-pr-new",
3
- "version": "0.0.29",
3
+ "version": "0.0.30",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -28,7 +28,7 @@
28
28
  "package-manager-detector": "^0.1.2",
29
29
  "pkg-types": "^1.1.1",
30
30
  "query-registry": "^3.0.1",
31
- "tinyglobby": "0.2.6"
31
+ "tinyglobby": "^0.2.9"
32
32
  },
33
33
  "devDependencies": {
34
34
  "@pkg-pr-new/utils": "workspace:^",