@bhsd/common 0.6.3 → 0.6.4

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/index.js CHANGED
@@ -16,8 +16,8 @@ var __copyProps = (to, from, except, desc) => {
16
16
  return to;
17
17
  };
18
18
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
- var src_exports = {};
20
- __export(src_exports, {
19
+ var index_exports = {};
20
+ __export(index_exports, {
21
21
  CDN: () => CDN,
22
22
  compareVersion: () => compareVersion,
23
23
  decodeHTML: () => decodeHTML,
@@ -29,12 +29,9 @@ __export(src_exports, {
29
29
  setObject: () => setObject,
30
30
  splitColors: () => splitColors
31
31
  });
32
- module.exports = __toCommonJS(src_exports);
32
+ module.exports = __toCommonJS(index_exports);
33
33
  const CDN = "https://testingcf.jsdelivr.net";
34
- let textarea;
35
- if (typeof document === "object") {
36
- textarea = document.createElement("textarea");
37
- }
34
+ const textarea = /* @__PURE__ */ (() => typeof document === "object" ? document.createElement("textarea") : void 0)();
38
35
  const decodeHTML = (str) => {
39
36
  textarea.innerHTML = str;
40
37
  return textarea.value;
package/dist/index.mjs CHANGED
@@ -1,8 +1,5 @@
1
1
  const CDN = "https://testingcf.jsdelivr.net";
2
- let textarea;
3
- if (typeof document === "object") {
4
- textarea = document.createElement("textarea");
5
- }
2
+ const textarea = /* @__PURE__ */ (() => typeof document === "object" ? document.createElement("textarea") : void 0)();
6
3
  const decodeHTML = (str) => {
7
4
  textarea.innerHTML = str;
8
5
  return textarea.value;
package/eslintrc.cjs CHANGED
@@ -862,6 +862,7 @@ module.exports = {
862
862
  allowAsThisParameter: true,
863
863
  },
864
864
  ],
865
+ '@typescript-eslint/no-misused-spread': 2,
865
866
  '@typescript-eslint/no-namespace': [
866
867
  2,
867
868
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bhsd/common",
3
- "version": "0.6.3",
3
+ "version": "0.6.4",
4
4
  "license": "MIT",
5
5
  "author": "Bhsd",
6
6
  "files": [
@@ -17,36 +17,38 @@
17
17
  "./package.json": "./package.json"
18
18
  },
19
19
  "types": "./dist/index.d.ts",
20
+ "sideEffects": false,
20
21
  "bin": {
21
22
  "copy-dev": "bin/dev.cjs"
22
23
  },
23
24
  "scripts": {
24
25
  "prepublishOnly": "npm run build",
25
- "build": "tsc --emitDeclarationOnly && esbuild src/index.ts --charset=utf8 --target=es2023 --format=cjs --outfile=dist/index.js && esbuild src/index.ts --charset=utf8 --target=es2023 --format=esm --outfile=dist/index.mjs",
26
+ "build": "tsc --emitDeclarationOnly && esbuild src/index.ts --charset=utf8 --target=es2024 --format=cjs --outfile=dist/index.js && esbuild src/index.ts --charset=utf8 --target=es2024 --format=esm --outfile=dist/index.mjs",
26
27
  "lint:ts": "tsc --noEmit && eslint --cache .",
27
28
  "lint": "npm run lint:ts"
28
29
  },
29
30
  "devDependencies": {
30
- "@stylistic/eslint-plugin": "^2.11.0",
31
- "@stylistic/stylelint-plugin": "^3.1.1",
31
+ "@stylistic/eslint-plugin": "^3.1.0",
32
+ "@stylistic/stylelint-plugin": "^3.1.2",
32
33
  "@types/mocha": "^10.0.10",
33
- "@typescript-eslint/eslint-plugin": "^8.16.0",
34
- "@typescript-eslint/parser": "^8.16.0",
35
- "esbuild": "^0.24.0",
34
+ "@types/node": "^22.13.1",
35
+ "@typescript-eslint/eslint-plugin": "^8.23.0",
36
+ "@typescript-eslint/parser": "^8.23.0",
37
+ "esbuild": "^0.25.0",
36
38
  "eslint": "^8.57.1",
37
39
  "eslint-plugin-es-x": "^8.4.1",
38
40
  "eslint-plugin-eslint-comments": "^3.2.0",
39
- "eslint-plugin-jsdoc": "^50.6.0",
41
+ "eslint-plugin-jsdoc": "^50.6.3",
40
42
  "eslint-plugin-json-es": "^1.6.0",
41
43
  "eslint-plugin-markdown": "4.0.1",
42
- "eslint-plugin-n": "^17.14.0",
44
+ "eslint-plugin-n": "^17.15.1",
43
45
  "eslint-plugin-promise": "^7.2.1",
44
- "eslint-plugin-regexp": "^2.6.0",
46
+ "eslint-plugin-regexp": "^2.7.0",
45
47
  "eslint-plugin-unicorn": "^56.0.1",
46
- "http-server": "^14.1.0",
47
- "mocha": "^10.8.2",
48
- "stylelint": "^16.11.0",
49
- "stylelint-config-recommended": "^14.0.0",
50
- "typescript": "^5.7.2"
48
+ "http-server": "^14.1.1",
49
+ "mocha": "^11.1.0",
50
+ "stylelint": "^16.14.1",
51
+ "stylelint-config-recommended": "^15.0.0",
52
+ "typescript": "^5.7.3"
51
53
  }
52
54
  }