kirbyup 3.1.4 → 3.1.5

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/dist/node/cli.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  import { cac } from 'cac';
2
- import { n as name, b as build, s as serve, v as version, h as handleError } from '../shared/kirbyup.DSMJ9KWQ.mjs';
2
+ import { n as name, b as build, s as serve, v as version, h as handleError } from '../shared/kirbyup.DKFIHHbk.mjs';
3
3
  import 'node:fs';
4
4
  import 'node:fs/promises';
5
5
  import 'pathe';
@@ -10,7 +10,7 @@ import '@vitejs/plugin-vue2';
10
10
  import '@vitejs/plugin-vue2-jsx';
11
11
  import 'vite-plugin-full-reload';
12
12
  import 'rollup-plugin-external-globals';
13
- export { b as build, s as serve } from '../shared/kirbyup.DSMJ9KWQ.mjs';
13
+ export { b as build, s as serve } from '../shared/kirbyup.DKFIHHbk.mjs';
14
14
  import 'node:zlib';
15
15
  import 'node:util';
16
16
  import 'node:buffer';
@@ -21,7 +21,7 @@ import MagicString from 'magic-string';
21
21
  import 'node:module';
22
22
 
23
23
  const name = "kirbyup";
24
- const version = "3.1.4";
24
+ const version = "3.1.5";
25
25
 
26
26
  class PrettyError extends Error {
27
27
  constructor(message) {
@@ -185,7 +185,7 @@ function kirbyupGlobImportPlugin() {
185
185
  async function findup(cwd, match, options = {}) {
186
186
  const segments = normalize(cwd).split("/");
187
187
  while (segments.length > 0) {
188
- const path = segments.join("/");
188
+ const path = segments.join("/") || "/";
189
189
  const result = await match(path);
190
190
  if (result || !options.includeParentDirs) {
191
191
  return result;
@@ -195,7 +195,11 @@ async function findup(cwd, match, options = {}) {
195
195
  }
196
196
 
197
197
  const packageManagers = [
198
- { name: "npm", command: "npm", lockFile: "package-lock.json" },
198
+ {
199
+ name: "npm",
200
+ command: "npm",
201
+ lockFile: "package-lock.json"
202
+ },
199
203
  {
200
204
  name: "pnpm",
201
205
  command: "pnpm",
@@ -223,7 +227,7 @@ const packageManagers = [
223
227
  ];
224
228
  async function detectPackageManager(cwd, options = {}) {
225
229
  const detected = await findup(
226
- cwd,
230
+ resolve(cwd || "."),
227
231
  async (path) => {
228
232
  if (!options.ignorePackageJSON) {
229
233
  const packageJSONPath = join(path, "package.json");
@@ -265,6 +269,17 @@ async function detectPackageManager(cwd, options = {}) {
265
269
  includeParentDirs: options.includeParentDirs ?? true
266
270
  }
267
271
  );
272
+ if (!detected && !options.ignoreArgv) {
273
+ const scriptArg = process.argv[1];
274
+ if (scriptArg) {
275
+ for (const packageManager of packageManagers) {
276
+ const re = new RegExp(`[/\\\\]\\.?${packageManager.command}`);
277
+ if (re.test(scriptArg)) {
278
+ return packageManager;
279
+ }
280
+ }
281
+ }
282
+ }
268
283
  return detected;
269
284
  }
270
285
 
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "kirbyup",
3
3
  "type": "module",
4
- "version": "3.1.4",
5
- "packageManager": "pnpm@8.15.3",
4
+ "version": "3.1.5",
5
+ "packageManager": "pnpm@8.15.4",
6
6
  "description": "Zero-config bundler for Kirby Panel plugins",
7
7
  "author": {
8
8
  "name": "Johann Schopplich",
@@ -61,9 +61,9 @@
61
61
  "scripts": {
62
62
  "build": "unbuild",
63
63
  "dev": "UNBUILD_STUB=true unbuild",
64
- "docs": "pnpm -C docs run dev",
65
- "docs:build": "pnpm -C docs run build",
66
- "docs:serve": "pnpm -C docs run serve",
64
+ "docs:dev": "vitepress dev docs",
65
+ "docs:build": "vitepress build docs",
66
+ "docs:preview": "vitepress preview docs",
67
67
  "lint": "eslint .",
68
68
  "lint:fix": "eslint . --fix",
69
69
  "release": "bumpp --commit --push --tag",
@@ -75,11 +75,11 @@
75
75
  "@vitejs/plugin-vue2": "2.2.0",
76
76
  "@vitejs/plugin-vue2-jsx": "1.1.0",
77
77
  "@vue/compiler-sfc": "^2.7.16",
78
- "c12": "^1.8.0",
78
+ "c12": "^1.10.0",
79
79
  "cac": "^6.7.14",
80
80
  "chokidar": "^3.6.0",
81
81
  "consola": "^3.2.3",
82
- "magic-string": "^0.30.7",
82
+ "magic-string": "^0.30.8",
83
83
  "pathe": "^1.1.2",
84
84
  "perfect-debounce": "^1.0.0",
85
85
  "postcss": "^8.4.35",
@@ -87,25 +87,25 @@
87
87
  "postcss-load-config": "^5.0.3",
88
88
  "postcss-logical": "^7.0.1",
89
89
  "rollup-plugin-external-globals": "^0.9.2",
90
- "sass": "^1.70.0",
91
- "vite": "^5.1.2",
90
+ "sass": "^1.71.1",
91
+ "vite": "^5.1.6",
92
92
  "vite-plugin-full-reload": "^1.1.0",
93
93
  "vue": "^2.7.16"
94
94
  },
95
95
  "devDependencies": {
96
- "@antfu/eslint-config": "^2.6.4",
96
+ "@antfu/eslint-config": "^2.8.0",
97
97
  "@types/fs-extra": "^11.0.4",
98
- "@types/node": "^20.11.18",
98
+ "@types/node": "^20.11.25",
99
99
  "@types/prompts": "^2.4.9",
100
- "bumpp": "^9.3.0",
101
- "eslint": "^8.56.0",
100
+ "bumpp": "^9.4.0",
101
+ "eslint": "^8.57.0",
102
102
  "fast-glob": "^3.3.2",
103
103
  "fs-extra": "^11.2.0",
104
- "nypm": "^0.3.6",
105
- "simple-git-hooks": "^2.9.0",
104
+ "nypm": "^0.3.8",
105
+ "simple-git-hooks": "^2.10.0",
106
106
  "typescript": "~5.3.3",
107
107
  "unbuild": "^3.0.0-rc.1",
108
- "vitest": "^1.2.2"
108
+ "vitest": "^1.3.1"
109
109
  },
110
110
  "simple-git-hooks": {
111
111
  "commit-msg": "node scripts/verifyCommit.mjs $1"