diff --git a/package.json b/package.json index 5e87c77..d6e204a 100644 --- a/package.json +++ b/package.json @@ -29,22 +29,22 @@ "@babel/eslint-parser": "^7.25.9", "@babel/plugin-syntax-import-attributes": "^7.26.0", "@types/jsdom": "^21.1.7", - "@types/node": "^22.10.1", - "c8": "^10.1.2", + "@types/node": "^22.10.2", + "c8": "^10.1.3", "chai": "^5.1.2", "commander": "^12.1.0", "copyfiles": "^2.4.1", "csvtojson": "^2.0.10", "esbuild": "^0.24.0", - "eslint": "^9.16.0", + "eslint": "^9.17.0", "eslint-plugin-import-x": "^4.5.0", - "eslint-plugin-jsdoc": "^50.6.0", + "eslint-plugin-jsdoc": "^50.6.1", "eslint-plugin-regexp": "^2.7.0", "eslint-plugin-unicorn": "^56.0.1", "globals": "^15.13.0", "http-server": "^14.1.1", "mocha": "^11.0.1", - "neostandard": "^0.11.9", + "neostandard": "^0.12.0", "npm-run-all2": "^7.0.1", "sinon": "^19.0.2", "typescript": "^5.7.2", @@ -55,17 +55,17 @@ "bundle": "npm-run-all -s bundle-*", "bundle-min": "esbuild --format=esm --platform=browser --outfile=dist/url-sanitizer.min.js --bundle --minify --sourcemap bundle/index.js", "bundle-min-wo-dompurify": "esbuild --format=esm --platform=browser --outfile=dist/url-sanitizer-wo-dompurify.min.js --bundle --minify --sourcemap bundle_wo_dompurify/index.js", - "char": "node modules/index char -i", + "char": "node scripts/index char -i", "copy": "npm-run-all -s copy-*", "copy-src": "copyfiles --up=1 --verbose src/**/* --exclude=src/mjs/dompurify.js --exclude=src/mjs/file-reader.js --exclude=src/mjs/lib-util.js bundle", "copy-src-wo-dompurify": "copyfiles --up=1 --verbose src/**/* --exclude=src/mjs/dompurify.js --exclude=src/mjs/file-reader.js --exclude=src/mjs/lib-util.js bundle_wo_dompurify", "copy-repl": "copyfiles --up=1 --verbose repl/dompurify.js repl/file-reader.js repl/lib-util.js bundle/mjs", - "copy-repl-wo-dompurify": "copyfiles --up=1 --verbose repl/dompurify-global.js repl/file-reader.js repl/lib-util.js bundle_wo_dompurify/mjs && node modules/index rename --oldpath=bundle_wo_dompurify/mjs/dompurify-global.js --newpath=bundle_wo_dompurify/mjs/dompurify.js -i", - "include": "node modules/index include --dir=iana -i", + "copy-repl-wo-dompurify": "copyfiles --up=1 --verbose repl/dompurify-global.js repl/file-reader.js repl/lib-util.js bundle_wo_dompurify/mjs && node scripts/index rename --oldpath=bundle_wo_dompurify/mjs/dompurify-global.js --newpath=bundle_wo_dompurify/mjs/dompurify.js -i", + "include": "node scripts/index include --dir=iana -i", "lint": "eslint --fix .", "test": "c8 --reporter=text mocha --exit test/*.test.js", "test-bdd": "http-server ./ -c-1 -o test/bdd/url-sanitizer.test.html", - "tsc": "node modules/index clean --dir=types -i && npx tsc" + "tsc": "node scripts/index clean --dir=types -i && npx tsc" }, "version": "2.0.6" } diff --git a/modules/commander.js b/scripts/commander.js similarity index 100% rename from modules/commander.js rename to scripts/commander.js diff --git a/modules/common.js b/scripts/common.js similarity index 100% rename from modules/common.js rename to scripts/common.js diff --git a/modules/file-util.js b/scripts/file-util.js similarity index 100% rename from modules/file-util.js rename to scripts/file-util.js diff --git a/modules/index.js b/scripts/index.js similarity index 100% rename from modules/index.js rename to scripts/index.js diff --git a/test/commander.test.js b/test/commander.test.js index b4f004a..1536833 100644 --- a/test/commander.test.js +++ b/test/commander.test.js @@ -11,7 +11,7 @@ import { getGlobalDispatcher, MockAgent, setGlobalDispatcher } from 'undici'; import { commander, cleanDirectory, createCharTable, includeLibraries, parseCommand, renameFile, saveUriSchemes, storeTextChars -} from '../modules/commander.js'; +} from '../scripts/commander.js'; /* constants */ const BASE_URL_IANA = 'https://www.iana.org'; diff --git a/test/common.test.js b/test/common.test.js index 9ff2385..6f5f57f 100644 --- a/test/common.test.js +++ b/test/common.test.js @@ -6,7 +6,7 @@ import sinon from 'sinon'; /* test */ import { getType, isString, logErr, logMsg, logWarn, sleep, throwErr -} from '../modules/common.js'; +} from '../scripts/common.js'; describe('getType', () => { it('should get Undefined', () => { diff --git a/test/file-reader.test.js b/test/file-reader.test.js index 75cc8ed..3094394 100644 --- a/test/file-reader.test.js +++ b/test/file-reader.test.js @@ -6,7 +6,7 @@ import { strict as assert } from 'node:assert'; import sinon from 'sinon'; import { describe, it } from 'mocha'; -import { sleep } from '../modules/common.js'; +import { sleep } from '../scripts/common.js'; /* test */ import { diff --git a/test/file-util.test.js b/test/file-util.test.js index d337fb1..7f5746b 100644 --- a/test/file-util.test.js +++ b/test/file-util.test.js @@ -10,7 +10,7 @@ import { getGlobalDispatcher, MockAgent, setGlobalDispatcher } from 'undici'; /* test */ import { createFile, fetchText, getStat, isDir, isFile, removeDir, rename -} from '../modules/file-util.js'; +} from '../scripts/file-util.js'; /* constants */ const TMPDIR = process.env.TMP || process.env.TMPDIR || process.env.TEMP || diff --git a/test/index.test.js b/test/index.test.js index f89c6a2..836b06d 100644 --- a/test/index.test.js +++ b/test/index.test.js @@ -1,7 +1,7 @@ /* api */ import { strict as assert } from 'node:assert'; import { describe, it } from 'mocha'; -import { isString } from '../modules/common.js'; +import { isString } from '../scripts/common.js'; /* test */ import urlSanitizer, { diff --git a/test/sanitizer.test.js b/test/sanitizer.test.js index c299753..6240c0c 100644 --- a/test/sanitizer.test.js +++ b/test/sanitizer.test.js @@ -5,7 +5,7 @@ /* api */ import { strict as assert } from 'node:assert'; import { describe, it } from 'mocha'; -import { isString } from '../modules/common.js'; +import { isString } from '../scripts/common.js'; /* test */ import uriSchemes from '../src/lib/iana/uri-schemes.json' with {