|
2 | 2 | "name": "connect-mongo", |
3 | 3 | "version": "5.1.0", |
4 | 4 | "description": "MongoDB session store for Express and Connect", |
5 | | - "main": "build/main/index.js", |
6 | | - "typings": "build/main/index.d.ts", |
| 5 | + "type": "module", |
| 6 | + "main": "./dist/index.cjs", |
| 7 | + "module": "./dist/index.mjs", |
| 8 | + "exports": { |
| 9 | + ".": { |
| 10 | + "import": "./dist/index.mjs", |
| 11 | + "require": "./dist/index.cjs" |
| 12 | + }, |
| 13 | + "./package.json": "./package.json" |
| 14 | + }, |
| 15 | + "types": "./dist/index.d.cts", |
| 16 | + "typings": "./dist/index.d.ts", |
7 | 17 | "keywords": [ |
8 | 18 | "connect", |
9 | 19 | "mongo", |
|
25 | 35 | "url": "https://github.com/jdesboeufs/connect-mongo/issues" |
26 | 36 | }, |
27 | 37 | "scripts": { |
28 | | - "prebuild": "rm -rf build", |
29 | | - "build": "run-p build:*", |
30 | | - "build:main": "tsc -p tsconfig.json", |
| 38 | + "typecheck": "tsc --noEmit", |
| 39 | + "build": "tsdown", |
31 | 40 | "fix": "run-s fix:*", |
32 | 41 | "fix:prettier": "prettier \"src/**/*.ts\" --write", |
33 | 42 | "fix:lint": "cross-env ESLINT_USE_FLAT_CONFIG=false eslint --cache src --ext .ts --fix", |
34 | | - "test": "run-s build test:*", |
| 43 | + "test": "run-s test:*", |
35 | 44 | "test:lint": "cross-env ESLINT_USE_FLAT_CONFIG=false eslint --cache src --ext .ts", |
36 | 45 | "test:prettier": "prettier \"src/**/*.ts\" --list-different", |
37 | | - "test:unit": "nyc ava", |
38 | | - "watch:build": "tsc -p tsconfig.json -w", |
39 | | - "watch:test": "nyc --silent ava --watch", |
40 | | - "cov": "run-s build test:unit cov:html cov:lcov && open-cli coverage/index.html", |
41 | | - "cov:html": "nyc report --reporter=html", |
42 | | - "cov:lcov": "nyc report --reporter=lcov", |
| 46 | + "test:unit": "c8 ava", |
| 47 | + "watch:test": "c8 ava --watch", |
| 48 | + "cov": "run-s test:unit cov:html cov:lcov && open-cli coverage/index.html", |
| 49 | + "cov:html": "c8 report --reporter=html", |
| 50 | + "cov:lcov": "c8 report --reporter=lcov", |
43 | 51 | "cov:send": "run-s cov:lcov && codecov", |
44 | | - "cov:check": "nyc report && nyc check-coverage", |
45 | | - "doc": "run-s doc:html && open-cli build/docs/index.html", |
46 | | - "doc:html": "typedoc --entryPointStrategy expand --entryPoints src --exclude **/*.spec.ts --out build/docs", |
47 | | - "doc:json": "typedoc --entryPointStrategy expand --entryPoints src --exclude **/*.spec.ts --json build/docs/typedoc.json", |
48 | | - "doc:publish": "gh-pages -m \"[ci skip] Updates\" -d build/docs", |
| 52 | + "cov:check": "c8 report --check-coverage", |
| 53 | + "doc": "run-s doc:html && open-cli dist/docs/index.html", |
| 54 | + "doc:html": "typedoc --entryPointStrategy expand --entryPoints src --exclude **/*.spec.ts --out dist/docs", |
| 55 | + "doc:json": "typedoc --entryPointStrategy expand --entryPoints src --exclude **/*.spec.ts --json dist/docs/typedoc.json", |
| 56 | + "doc:publish": "gh-pages -m \"[ci skip] Updates\" -d dist/docs", |
49 | 57 | "version": "standard-version", |
50 | 58 | "prepare-release": "run-s test cov:check doc:html version doc:publish", |
51 | 59 | "prepare": "husky", |
|
66 | 74 | "@ava/typescript": "^6.0.0", |
67 | 75 | "@commitlint/cli": "^20.1.0", |
68 | 76 | "@commitlint/config-conventional": "^20.0.0", |
69 | | - "@istanbuljs/nyc-config-typescript": "^1.0.1", |
70 | 77 | "@types/debug": "^4.1.12", |
71 | 78 | "@types/express": "^4.17.21", |
72 | 79 | "@types/express-session": "^1.18.2", |
|
76 | 83 | "@typescript-eslint/parser": "^8.46.4", |
77 | 84 | "ava": "^6.4.1", |
78 | 85 | "codecov": "^3.5.0", |
79 | | - "cspell": "^9.3.2", |
80 | 86 | "cz-conventional-changelog": "^3.3.0", |
81 | 87 | "eslint": "^9.39.1", |
82 | 88 | "eslint-config-prettier": "^10.1.8", |
|
89 | 95 | "lint-staged": "^16.2.6", |
90 | 96 | "mongodb": "^7.0.0", |
91 | 97 | "npm-run-all": "^4.1.5", |
92 | | - "nyc": "^17.1.0", |
| 98 | + "c8": "^10.1.2", |
93 | 99 | "open-cli": "^8.0.0", |
94 | 100 | "prettier": "^3.6.2", |
95 | 101 | "standard-version": "^9.0.0", |
96 | 102 | "supertest": "^7.1.4", |
97 | | - "ts-node": "^10.9.2", |
| 103 | + "tsdown": "^0.16.4", |
98 | 104 | "typedoc": "^0.28.14", |
99 | 105 | "typescript": "^5.9.3", |
100 | 106 | "cross-env": "^10.1.0" |
101 | 107 | }, |
102 | 108 | "files": [ |
103 | | - "build/main", |
104 | | - "build/module", |
| 109 | + "dist", |
105 | 110 | "!**/*.spec.*", |
106 | 111 | "!**/*.json", |
107 | | - "!build/*/test/*", |
| 112 | + "!dist/*/test/*", |
108 | 113 | "CHANGELOG.md", |
109 | 114 | "LICENSE", |
110 | 115 | "README.md" |
111 | 116 | ], |
112 | | - "ava": { |
113 | | - "failFast": true, |
114 | | - "timeout": "60s", |
115 | | - "typescript": { |
116 | | - "rewritePaths": { |
117 | | - "src/": "build/main/" |
118 | | - }, |
119 | | - "compile": false |
120 | | - }, |
121 | | - "files": [ |
122 | | - "!build/module/**", |
123 | | - "!src/test/testHelper.ts" |
124 | | - ] |
125 | | - }, |
126 | 117 | "config": { |
127 | 118 | "commitizen": { |
128 | 119 | "path": "cz-conventional-changelog" |
|
133 | 124 | "semi": false, |
134 | 125 | "trailingComma": "es5" |
135 | 126 | }, |
136 | | - "nyc": { |
137 | | - "extends": "@istanbuljs/nyc-config-typescript", |
| 127 | + "c8": { |
| 128 | + "include": [ |
| 129 | + "build/**/*.js" |
| 130 | + ], |
138 | 131 | "exclude": [ |
139 | | - "**/*.spec.js" |
140 | | - ] |
| 132 | + "build/**/*.{spec,test}.js", |
| 133 | + "build/**/test/**/*.js", |
| 134 | + "node_modules/**" |
| 135 | + ], |
| 136 | + "reporter": [ |
| 137 | + "text", |
| 138 | + "lcov", |
| 139 | + "html" |
| 140 | + ], |
| 141 | + "all": true, |
| 142 | + "skipFull": false, |
| 143 | + "check-coverage": true, |
| 144 | + "branches": 75, |
| 145 | + "functions": 70, |
| 146 | + "lines": 80, |
| 147 | + "statements": 80 |
141 | 148 | }, |
142 | 149 | "lint-staged": { |
143 | 150 | "**/*.{ts,js}": [ |
|
0 commit comments