@aidc-toolkit/utility 0.9.11-beta → 0.9.13-beta

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": "@aidc-toolkit/utility",
3
- "version": "0.9.11-beta",
3
+ "version": "0.9.13-beta",
4
4
  "description": "Foundational utilities for AIDC Toolkit",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -20,20 +20,18 @@
20
20
  },
21
21
  "scripts": {
22
22
  "lint": "eslint .",
23
- "build-dist": "tsup src/index.ts --clean --format cjs,esm --dts",
24
- "build-doc": "npm run build-dist && tsc src/index.ts --outDir dist --target esnext --moduleResolution nodenext --module nodenext --emitDeclarationOnly --declaration --declarationMap",
23
+ "build:core": "tsup src/index.ts --format cjs,esm --dts --clean",
24
+ "build:dev": "npm run build:core && tsc src/index.ts --outDir dist --target esnext --moduleResolution nodenext --module nodenext --emitDeclarationOnly --declaration --declarationMap",
25
+ "build:release": "npm run build:core -- --minify",
26
+ "publish-dev": "publish-dev",
25
27
  "test": "vitest run"
26
28
  },
27
29
  "devDependencies": {
28
- "@aidc-toolkit/dev": "^0.9.11-beta",
29
- "eslint": "^9.18.0",
30
- "ts-node": "^10.9.2",
31
- "tsup": "^8.3.5",
32
- "typescript": "^5.7.3",
33
- "vitest": "^2.1.8"
30
+ "@aidc-toolkit/dev": "^0.9.13-beta",
31
+ "vitest": "^3.0.5"
34
32
  },
35
33
  "dependencies": {
36
- "@aidc-toolkit/core": "^0.9.11-beta",
37
- "i18next": "^24.2.1"
34
+ "@aidc-toolkit/core": "^0.9.13-beta",
35
+ "i18next": "^24.2.2"
38
36
  }
39
37
  }
@@ -172,7 +172,7 @@ export class CharacterSetValidator implements StringValidator<CharacterSetValida
172
172
  * Array of indexes for each character or undefined if the character is not in the character set.
173
173
  */
174
174
  characterIndexes(s: string): ReadonlyArray<number | undefined> {
175
- return s.split("").map(c => this._characterSetMap.get(c));
175
+ return Array.from(s).map(c => this._characterSetMap.get(c));
176
176
  }
177
177
 
178
178
  /**
@@ -113,7 +113,10 @@ describe("Encryption", () => {
113
113
  testTransformer(10, 1);
114
114
  });
115
115
 
116
- test("Large domain and tweak", () => {
116
+ test("Large domain and tweak", {
117
+ // Test can take a long time.
118
+ timeout: 2 * 60 * 1000
119
+ }, () => {
117
120
  testTransformer(100000, 123456);
118
121
  });
119
122
 
File without changes