create-bananass 0.2.0 → 0.3.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-bananass",
3
- "version": "0.2.0",
3
+ "version": "0.3.1",
4
4
  "type": "module",
5
5
  "description": "Create a Bananass framework project for solving Baekjoon problems with JavaScript/TypeScript.🍌",
6
6
  "exports": {
@@ -51,15 +51,14 @@
51
51
  },
52
52
  "scripts": {
53
53
  "prepublishOnly": "npm run build",
54
- "build": "node ../../scripts/cp.mjs ../../LICENSE.md LICENSE.md ../../README.md README.md",
54
+ "build": "npx tsc --noEmit && node ../../scripts/cp.mjs ../../LICENSE.md LICENSE.md ../../README.md README.md",
55
55
  "test": "node --test",
56
56
  "dev": "node src/cli.js"
57
57
  },
58
58
  "dependencies": {
59
- "bananass-utils-console": "^0.2.0",
59
+ "bananass-utils-console": "^0.3.1",
60
60
  "commander": "^14.0.0",
61
- "consola": "^3.4.2",
62
- "is-interactive": "^2.0.0"
61
+ "consola": "^3.4.2"
63
62
  },
64
- "gitHead": "6abd277384f9f42395eac3edbf3264e2b2770eb9"
63
+ "gitHead": "f2a5479ecbc8cc9f4260afb29c4aa9b7d38ab688"
65
64
  }
package/src/cli.js CHANGED
@@ -15,12 +15,12 @@ import { createRequire } from 'node:module';
15
15
  import { spawn } from 'node:child_process';
16
16
  import { resolve } from 'node:path';
17
17
 
18
+ import isInteractive from 'bananass-utils-console/is-interactive';
18
19
  import createLogger from 'bananass-utils-console/logger';
19
20
  import createSpinner from 'bananass-utils-console/spinner';
20
21
  import { bananass, error, success } from 'bananass-utils-console/theme';
21
22
  import { program } from 'commander';
22
23
  import { consola } from 'consola';
23
- import isInteractive from 'is-interactive';
24
24
 
25
25
  // --------------------------------------------------------------------------------
26
26
  // Typedefs
@@ -231,9 +231,10 @@ program
231
231
  );
232
232
 
233
233
  await rename(resolve(directory, 'gitignore'), resolve(directory, '.gitignore'));
234
- } catch ({ message }) {
234
+ } catch (err) {
235
235
  logger.log(() => spinner.error(error('Failed to copy files')));
236
236
 
237
+ const message = err instanceof Error ? err.message : String(err);
237
238
  throw new Error(error(message, true));
238
239
  }
239
240
 
@@ -280,11 +281,12 @@ program
280
281
  }),
281
282
  ),
282
283
  );
283
- } catch ({ message }) {
284
+ } catch (err) {
284
285
  logger.log(() =>
285
286
  spinner.error(error('Failed to install Visual Studio Code extensions')),
286
287
  );
287
288
 
289
+ const message = err instanceof Error ? err.message : String(err);
288
290
  throw new Error(error(message, true));
289
291
  }
290
292
  }
@@ -315,9 +317,10 @@ program
315
317
  rej(err);
316
318
  });
317
319
  });
318
- } catch ({ message }) {
320
+ } catch (err) {
319
321
  logger.log(() => spinner.error(error('Failed to initialize git')));
320
322
 
323
+ const message = err instanceof Error ? err.message : String(err);
321
324
  throw new Error(error(message, true));
322
325
  }
323
326
  }
@@ -348,9 +351,10 @@ program
348
351
  rej(err);
349
352
  });
350
353
  });
351
- } catch ({ message }) {
354
+ } catch (err) {
352
355
  logger.log(() => spinner.error(error('Failed to install packages')));
353
356
 
357
+ const message = err instanceof Error ? err.message : String(err);
354
358
  throw new Error(error(message, true));
355
359
  }
356
360
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "private": true,
3
3
  "name": "create-bananass-javascript-cjs",
4
- "version": "0.2.0",
4
+ "version": "0.3.1",
5
5
  "type": "commonjs",
6
6
  "engines": {
7
7
  "node": "^20.18.0 || ^22.3.0 || >= 24.0.0"
@@ -22,10 +22,10 @@
22
22
  "prettier:fix": "prettier . --write --ignore-unknown"
23
23
  },
24
24
  "devDependencies": {
25
- "bananass": "^0.2.0",
26
- "eslint": "^9.30.1",
27
- "eslint-config-bananass": "^0.2.0",
25
+ "bananass": "^0.3.1",
26
+ "eslint": "^9.32.0",
27
+ "eslint-config-bananass": "^0.3.1",
28
28
  "prettier": "^3.6.2",
29
- "prettier-config-bananass": "^0.2.0"
29
+ "prettier-config-bananass": "^0.3.1"
30
30
  }
31
31
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "private": true,
3
3
  "name": "create-bananass-javascript-esm",
4
- "version": "0.2.0",
4
+ "version": "0.3.1",
5
5
  "type": "module",
6
6
  "engines": {
7
7
  "node": "^20.18.0 || ^22.3.0 || >= 24.0.0"
@@ -22,10 +22,10 @@
22
22
  "prettier:fix": "prettier . --write --ignore-unknown"
23
23
  },
24
24
  "devDependencies": {
25
- "bananass": "^0.2.0",
26
- "eslint": "^9.30.1",
27
- "eslint-config-bananass": "^0.2.0",
25
+ "bananass": "^0.3.1",
26
+ "eslint": "^9.32.0",
27
+ "eslint-config-bananass": "^0.3.1",
28
28
  "prettier": "^3.6.2",
29
- "prettier-config-bananass": "^0.2.0"
29
+ "prettier-config-bananass": "^0.3.1"
30
30
  }
31
31
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "private": true,
3
3
  "name": "create-bananass-typescript-cjs",
4
- "version": "0.2.0",
4
+ "version": "0.3.1",
5
5
  "type": "commonjs",
6
6
  "engines": {
7
7
  "node": "^20.18.0 || ^22.3.0 || >= 24.0.0"
@@ -23,12 +23,12 @@
23
23
  "tsc": "tsc"
24
24
  },
25
25
  "devDependencies": {
26
- "bananass": "^0.2.0",
27
- "eslint": "^9.30.1",
28
- "eslint-config-bananass": "^0.2.0",
29
- "jiti": "^2.4.2",
26
+ "bananass": "^0.3.1",
27
+ "eslint": "^9.32.0",
28
+ "eslint-config-bananass": "^0.3.1",
29
+ "jiti": "^2.5.1",
30
30
  "prettier": "^3.6.2",
31
- "prettier-config-bananass": "^0.2.0",
31
+ "prettier-config-bananass": "^0.3.1",
32
32
  "typescript": "^5.8.3"
33
33
  }
34
34
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "private": true,
3
3
  "name": "create-bananass-typescript-esm",
4
- "version": "0.2.0",
4
+ "version": "0.3.1",
5
5
  "type": "module",
6
6
  "engines": {
7
7
  "node": "^20.18.0 || ^22.3.0 || >= 24.0.0"
@@ -23,12 +23,12 @@
23
23
  "tsc": "tsc"
24
24
  },
25
25
  "devDependencies": {
26
- "bananass": "^0.2.0",
27
- "eslint": "^9.30.1",
28
- "eslint-config-bananass": "^0.2.0",
29
- "jiti": "^2.4.2",
26
+ "bananass": "^0.3.1",
27
+ "eslint": "^9.32.0",
28
+ "eslint-config-bananass": "^0.3.1",
29
+ "jiti": "^2.5.1",
30
30
  "prettier": "^3.6.2",
31
- "prettier-config-bananass": "^0.2.0",
31
+ "prettier-config-bananass": "^0.3.1",
32
32
  "typescript": "^5.8.3"
33
33
  }
34
34
  }