zotero-plugin-scaffold 0.3.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.
Files changed (2) hide show
  1. package/dist/cli.mjs +12 -11
  2. package/package.json +4 -4
package/dist/cli.mjs CHANGED
@@ -1,8 +1,8 @@
1
1
  import process from 'node:process';
2
2
  import { Command } from 'commander';
3
- import { E as ExitSignals, l as logger, C as Config, B as Build, S as Serve, T as Test, R as Release } from './shared/zotero-plugin-scaffold.DWzaUAX4.mjs';
4
- import { readFile, writeFile } from 'node:fs/promises';
5
- import { pathExists, ensureFile } from 'fs-extra';
3
+ import { l as logger, E as ExitSignals, C as Config, B as Build, S as Serve, T as Test, R as Release } from './shared/zotero-plugin-scaffold.DWzaUAX4.mjs';
4
+ import { readFile } from 'node:fs/promises';
5
+ import { pathExists } from 'fs-extra';
6
6
  import tinyUpdateNotifier from 'tiny-update-notifier';
7
7
  import 'c12';
8
8
  import 'es-toolkit';
@@ -31,7 +31,7 @@ import 'node:http';
31
31
  import 'xvfb-ts';
32
32
 
33
33
  const name = "zotero-plugin-scaffold";
34
- const version = "0.3.0";
34
+ const version = "0.3.1";
35
35
  const pkg = {
36
36
  name: name,
37
37
  version: version};
@@ -39,14 +39,15 @@ const pkg = {
39
39
  async function checkGitIgnore() {
40
40
  if (!pathExists(".git"))
41
41
  return;
42
- await ensureFile(".gitignore");
43
- const contents = (await readFile(".gitignore", "utf-8")).split("\n");
42
+ if (!pathExists(".gitignore")) {
43
+ logger.warn("No .gitignore file found");
44
+ return;
45
+ }
46
+ const contents = await readFile(".gitignore", "utf-8");
44
47
  const ignores = ["node_modules", ".env", ".scaffold"];
45
- ignores.forEach((ignore) => {
46
- if (!contents.includes(ignore))
47
- contents.push(ignore);
48
- });
49
- await writeFile(".gitignore", contents.join("\n"));
48
+ const miss = ignores.filter((ignore) => !contents.match(ignore));
49
+ if (miss.length !== 0)
50
+ logger.warn(`We recommend adding the following to your .gitignore file: ${miss.join(", ")}`);
50
51
  }
51
52
 
52
53
  function updateNotifier(name, version) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "zotero-plugin-scaffold",
3
3
  "type": "module",
4
- "version": "0.3.0",
4
+ "version": "0.3.1",
5
5
  "description": "A scaffold for Zotero plugin development.",
6
6
  "author": "northword",
7
7
  "license": "AGPL-3.0-or-later",
@@ -63,18 +63,18 @@
63
63
  }
64
64
  },
65
65
  "dependencies": {
66
- "@swc/core": "^1.11.5",
66
+ "@swc/core": "^1.11.8",
67
67
  "adm-zip": "^0.5.16",
68
68
  "bumpp": "^10.0.3",
69
69
  "c12": "^3.0.2",
70
70
  "chokidar": "^4.0.3",
71
71
  "commander": "^13.1.0",
72
- "es-toolkit": "^1.32.0",
72
+ "es-toolkit": "^1.33.0",
73
73
  "esbuild": "^0.25.0",
74
74
  "fs-extra": "^11.3.0",
75
75
  "hookable": "^5.5.3",
76
76
  "octokit": "^4.1.2",
77
- "std-env": "^3.8.0",
77
+ "std-env": "^3.8.1",
78
78
  "tiny-update-notifier": "^2.0.0",
79
79
  "tinyglobby": "^0.2.12",
80
80
  "xvfb-ts": "^1.1.0"