Skip to content

Commit cb6f84e

Browse files
committed
~ big dev deps update
1 parent 28c4f2c commit cb6f84e

14 files changed

+5465
-5180
lines changed

.npmignore

-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
/build-scripts/
33
/test/
44

5-
/babel.config.js
65
/jest.config.cjs
76
/yarn.lock
87
/*.tgz

CHANGELOG.md

+5
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,18 @@ The format is based on [EZEZ Changelog](https://ezez.dev/changelog/)
44
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
55

66
## [UNRELEASED]
7+
- (nothing yet)
8+
9+
## [5.1.0] - 2024-03-31
710
### Added
811
- `timeLeft` property
912
### Changed
1013
- `restartOnly` methods supports updating timeout and instant first run
1114
- `startOnly` methods supports updating instant first run
1215
### Fixed
1316
- JSDoc is invalid about return types
17+
### Dev
18+
- big dev deps update
1419

1520
## [5.0.0] - 2023-05-07
1621
### Added

build-scripts/compile.cjs.after.mjs

+3
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
11
import fs from "fs-extra";
2+
import { run } from "./utils.mjs";
23

34
const contents = `{"type": "commonjs"}`;
45

56
(async () => {
67
console.info("[CJS compile post-processing started]");
78
await fs.writeFile("./dist/package.json", contents);
89
console.info("Written dist/package.json with commonjs type fix");
10+
await run("resolve-tspaths", ["--project", "tsconfig.cjs.json"]);
11+
console.info("Resolved TypeScript import paths");
912
console.info("[CJS compile post-processing ended]");
1013
})();

build-scripts/compile.esm.after.mjs

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1-
import fs from "fs-extra";
1+
import {run} from "./utils.mjs";
22

33
(async () => {
44
console.info("[ESM compile post-processing started]");
5+
await run("resolve-tspaths", ["--project", "tsconfig.esm.json"]);
6+
console.info("Resolved TypeScript import paths");
57
console.info("[ESM compile post-processing ended]");
68
})();

build-scripts/utils.mjs

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
import { spawn } from "child_process";
2+
3+
const run = (command, args) => {
4+
return new Promise((resolve, reject) => {
5+
const cmd = spawn(command, args, {
6+
stdio: ["ignore", "inherit", "inherit"],
7+
});
8+
9+
cmd.on("close", (code) => {
10+
if (!code) {
11+
resolve();
12+
return;
13+
}
14+
15+
reject(new Error(`Program exited with code ${code}`));
16+
});
17+
18+
cmd.on("error", () => {
19+
reject(new Error(`Can't start program`));
20+
});
21+
});
22+
};
23+
24+
export {
25+
run
26+
}

jest.config.cjs

+21-14
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,23 @@
11
module.exports = {
2-
// testMatch: [],
3-
collectCoverageFrom: [
4-
'src/**/*.{mjs,js,jsx,ts,tsx}',
5-
'!**/*.d.ts'
6-
],
7-
setupFiles: [
8-
'<rootDir>/test/bootstrap.cjs'
9-
],
10-
testURL: 'http://localhost:8080',
11-
moduleNameMapper: {
12-
'^(.*)\.js$': '$1',
13-
},
2+
"collectCoverageFrom": [
3+
"src/**/*.{mjs,js,jsx,ts,tsx}",
4+
"!**/*.d.ts"
5+
],
6+
"setupFiles": [
7+
"<rootDir>/test/bootstrap.cjs"
8+
],
9+
"moduleNameMapper": {
10+
"^(.*).js$": "$1"
11+
},
12+
"testEnvironmentOptions": {
13+
"url": "http://localhost:8080"
14+
},
15+
"transform": {
16+
"\\.[jt]sx?$": [
17+
"babel-jest",
18+
{
19+
"configFile": "./test/babel.config.cjs"
20+
}
21+
]
22+
}
1423
};
15-
16-

package.json

+29-28
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,26 @@
11
{
22
"name": "oop-timers",
3-
"version": "5.0.0+",
3+
"version": "5.1.0",
44
"repository": "[email protected]:dzek69/oop-timers.git",
55
"author": "Jacek Nowacki",
66
"license": "MIT",
77
"scripts": {
88
"test": "NODE_ENV=test jest",
99
"docs": "typedoc src/index.ts --skipErrorChecking --out docs --includeVersion",
10-
"compile": "yarn compile:esm && yarn compile:cjs",
10+
"compile": "pnpm run compile:esm && pnpm run compile:cjs",
1111
"compile:esm": "rm -rf esm && tsc --project tsconfig.esm.json && node ./build-scripts/compile.esm.after.mjs",
1212
"compile:cjs": "rm -rf dist && tsc --project tsconfig.cjs.json && node ./build-scripts/compile.cjs.after.mjs",
1313
"typecheck": "tsc --noEmit",
1414
"lint": "eslint src --ext .ts,.tsx,.js,.jsx,.mjs",
15-
"lint:fix": "yarn lint --fix",
16-
"prepack": "yarn compile",
17-
"prepublishOnly": "yarn audit && yarn lint && yarn test && yarn docs",
15+
"lint:fix": "pnpm run lint --fix",
16+
"prepack": "pnpm run compile",
17+
"prepublishOnly": "pnpm audit && pnpm run lint && pnpm run test && pnpm run docs",
1818
"start:dev": "nodemon",
19-
"start:dev:compatibility": "TS_NODE_FILES=true yarn start:dev",
19+
"start:dev:compatibility": "TS_NODE_FILES=true pnpm run start:dev",
2020
"prepare": "husky install",
21-
"updates": "npx --yes npm-check-updates --dep prod",
22-
"updates:dev": "npx --yes npm-check-updates --dep dev",
23-
"updates:all": "npx --yes npm-check-updates"
21+
"updates": "pnpm dlx npm-check-updates --dep prod",
22+
"updates:dev": "pnpm dlx npm-check-updates --dep dev",
23+
"updates:all": "pnpm dlx npm-check-updates"
2424
},
2525
"exports": {
2626
".": {
@@ -35,37 +35,38 @@
3535
"type": "module",
3636
"dependencies": {},
3737
"devDependencies": {
38-
"@babel/core": "^7.21.4",
39-
"@babel/preset-env": "^7.21.4",
40-
"@babel/preset-typescript": "^7.21.4",
41-
"@dzek69/eslint-config-base": "^2.4.0",
42-
"@dzek69/eslint-config-typescript": "^1.1.0",
43-
"@typescript-eslint/eslint-plugin": "^5.58.0",
44-
"@typescript-eslint/parser": "^5.58.0",
38+
"@babel/core": "^7.22.20",
39+
"@babel/preset-env": "^7.22.20",
40+
"@babel/preset-typescript": "^7.22.15",
41+
"@dzek69/eslint-config-base": "^2.5.0",
42+
"@dzek69/eslint-config-import": "^1.3.0",
43+
"@dzek69/eslint-config-import-typescript": "^1.0.1",
44+
"@dzek69/eslint-config-typescript": "^1.1.1",
45+
"@knodes/typedoc-plugin-pages": "^0.23.4",
46+
"@types/jest": "^29.5.5",
47+
"@typescript-eslint/eslint-plugin": "^5.61.0",
48+
"@typescript-eslint/parser": "^5.61.0",
4549
"babel-plugin-module-extension": "^0.1.3",
46-
"eslint": "^8.38.0",
50+
"eslint": "^8.44.0",
51+
"eslint-plugin-import": "^2.28.1",
4752
"fs-extra": "^11.1.1",
4853
"husky": "^8.0.3",
49-
"jest": "^29.5.0",
54+
"jest": "^29.7.0",
5055
"must": "^0.13.4",
51-
"nodemon": "^2.0.22",
56+
"nodemon": "^3.0.1",
57+
"prettier": "^2.8.8",
5258
"ts-node": "^10.9.1",
5359
"typedoc": "^0.23.0",
54-
"typescript": "^5.0.4",
55-
"@types/jest": "^29.5.0",
56-
"eslint-plugin-import": "^2.27.5",
57-
"@dzek69/eslint-config-import": "^1.2.0",
58-
"@dzek69/eslint-config-import-typescript": "^1.0.0",
59-
"@knodes/typedoc-plugin-pages": "^0.23.4",
60-
"prettier": "^2.8.7"
60+
"typescript": "^5.2.2",
61+
"resolve-tspaths": "^0.8.15"
6162
},
6263
"husky": {
6364
"hooks": {
64-
"pre-push": "yarn prepublishOnly && yarn compile"
65+
"pre-push": "pnpm run prepublishOnly && pnpm run compile"
6566
}
6667
},
6768
"libraryTemplate": {
68-
"version": "3.9.1",
69+
"version": "3.11.2",
6970
"language": "typescript",
7071
"fixDefaultForCommonJS": true,
7172
"jsx": false

0 commit comments

Comments
 (0)