@fr0st/datetime 8.0.3 → 8.1.0

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": "@fr0st/datetime",
3
- "version": "8.0.3",
3
+ "version": "8.1.0",
4
4
  "private": false,
5
5
  "description": "Immutable date and time handling for JavaScript with locale-aware formatting, parsing, calendar math, and IANA or fixed-offset time zones.",
6
6
  "keywords": [
@@ -28,11 +28,17 @@
28
28
  "sideEffects": false,
29
29
  "type": "module",
30
30
  "exports": {
31
- ".": "./src/index.js"
31
+ ".": {
32
+ "import": "./dist/frost-datetime.esm.js",
33
+ "default": "./dist/frost-datetime.esm.js"
34
+ },
35
+ "./dist/*": "./dist/*",
36
+ "./src/*": "./src/*"
32
37
  },
33
- "main": "src/index.js",
34
- "jsdelivr": "dist/frost-datetime.min.js",
35
- "unpkg": "dist/frost-datetime.min.js",
38
+ "main": "./dist/frost-datetime.esm.js",
39
+ "jsdelivr": "./dist/frost-datetime.min.js",
40
+ "unpkg": "./dist/frost-datetime.min.js",
41
+ "module": "./dist/frost-datetime.esm.js",
36
42
  "files": [
37
43
  "dist",
38
44
  "Formats.md",
@@ -41,19 +47,18 @@
41
47
  "src"
42
48
  ],
43
49
  "scripts": {
44
- "build": "npm run bundle && npm run minify",
45
- "bundle": "rollup --config",
50
+ "build": "vite build",
46
51
  "lint": "eslint",
47
- "minify": "terser --compress passes=2 --mangle --source-map \"content=dist/frost-datetime.js.map,url=frost-datetime.min.js.map\" --output dist/frost-datetime.min.js dist/frost-datetime.js",
48
52
  "locales": "php generate-locales.php > src/formatter/locales.js",
49
- "test": "mocha --forbid-only --file test/setup.js \"test/unit/**/*.test.js\""
53
+ "test": "vitest run",
54
+ "test:coverage": "vitest run --coverage"
50
55
  },
51
56
  "devDependencies": {
52
- "@fr0st/eslint-config": "^5.0.0",
53
- "eslint": "^10.8.1",
54
- "mocha": "^11.8.0",
55
- "rollup": "^4.62.4",
56
- "terser": "^5.50.0"
57
+ "@fr0st/eslint-config": "^5.0.1",
58
+ "@vitest/coverage-v8": "^4.1.11",
59
+ "eslint": "^10.9.1",
60
+ "vite": "^8.2.2",
61
+ "vitest": "^4.1.11"
57
62
  },
58
63
  "engines": {
59
64
  "node": "^20.19.0 || ^22.13.0 || >=24"