@remato/personal-code-to-birthday 1.2.1 → 1.2.2

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.
@@ -22,6 +22,9 @@ jobs:
22
22
  - name: Install dependencies
23
23
  run: npm install
24
24
 
25
+ - name: Check types
26
+ run: npm run typecheck
27
+
25
28
  - name: Check code format
26
29
  run: npm run prettier
27
30
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remato/personal-code-to-birthday",
3
- "version": "1.2.1",
3
+ "version": "1.2.2",
4
4
  "description": "Converts personal identification codes from various countries into birthdate",
5
5
  "license": "MIT",
6
6
  "main": "src/index.ts",
@@ -9,41 +9,19 @@
9
9
  },
10
10
  "scripts": {
11
11
  "build": "esbuild src/index.ts --bundle --outfile=demo/index.js --target=es2015 --global-name=personalCodeToBirthday",
12
- "test": "jest",
12
+ "test": "vitest run",
13
13
  "prettier": "prettier --list-different \"**/*.ts\"",
14
- "lint": "oxlint"
14
+ "lint": "oxlint",
15
+ "typecheck": "tsc --noEmit"
15
16
  },
16
17
  "devDependencies": {
17
18
  "@remato/prettier-config": "^1.1.0",
18
- "@types/jest": "^30.0.0",
19
- "esbuild": "^0.27.0",
20
- "jest": "^30.0.4",
21
- "oxlint": "^1.59.0",
22
- "prettier": "^3.3.3",
23
- "ts-jest": "^29.2.5",
24
- "typescript": "^5.6.3"
25
- },
26
- "jest": {
27
- "preset": "ts-jest",
28
- "testEnvironment": "node",
29
- "moduleFileExtensions": [
30
- "js",
31
- "ts"
32
- ],
33
- "testMatch": [
34
- "**/*.test.ts"
35
- ],
36
- "testPathIgnorePatterns": [
37
- "/node_modules/",
38
- "/dist/"
39
- ],
40
- "transform": {
41
- "^.+\\.ts$": "ts-jest"
42
- },
43
- "collectCoverage": true,
44
- "collectCoverageFrom": [
45
- "src/**"
46
- ]
19
+ "@vitest/coverage-v8": "^4.1.4",
20
+ "esbuild": "^0.28.0",
21
+ "oxlint": "^1.60.0",
22
+ "prettier": "^3.8.3",
23
+ "typescript": "^6.0.3",
24
+ "vitest": "^4.1.4"
47
25
  },
48
26
  "prettier": "@remato/prettier-config"
49
27
  }
package/src/index.test.ts CHANGED
@@ -1,3 +1,4 @@
1
+ import { describe, expect, test } from 'vitest'
1
2
  import personalCodeToBirthday from './index'
2
3
 
3
4
  describe('valid codes', () => {
package/tsconfig.json CHANGED
@@ -1,12 +1,10 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/tsconfig",
3
3
  "compilerOptions": {
4
- "rootDir": "./src",
5
4
  "outDir": "./demo",
6
- "outFile": "./demo/index.js",
7
5
  "target": "ES2022",
8
- "module": "system",
9
- "baseUrl": "./",
6
+ "module": "esnext",
7
+ "moduleResolution": "bundler",
10
8
  "sourceMap": true,
11
9
  "noImplicitAny": true,
12
10
  "esModuleInterop": true,
@@ -0,0 +1,14 @@
1
+ import { defineConfig } from 'vitest/config'
2
+
3
+ export default defineConfig({
4
+ test: {
5
+ globals: true,
6
+ mockReset: true,
7
+ coverage: {
8
+ enabled: true,
9
+ provider: 'v8',
10
+ include: ['src/**'],
11
+ reporter: ['text', 'lcov'],
12
+ },
13
+ },
14
+ })