-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
5,465 additions
and
5,180 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,6 @@ | |
/build-scripts/ | ||
/test/ | ||
|
||
/babel.config.js | ||
/jest.config.cjs | ||
/yarn.lock | ||
/*.tgz | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,13 @@ | ||
import fs from "fs-extra"; | ||
import { run } from "./utils.mjs"; | ||
|
||
const contents = `{"type": "commonjs"}`; | ||
|
||
(async () => { | ||
console.info("[CJS compile post-processing started]"); | ||
await fs.writeFile("./dist/package.json", contents); | ||
console.info("Written dist/package.json with commonjs type fix"); | ||
await run("resolve-tspaths", ["--project", "tsconfig.cjs.json"]); | ||
console.info("Resolved TypeScript import paths"); | ||
console.info("[CJS compile post-processing ended]"); | ||
})(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,8 @@ | ||
import fs from "fs-extra"; | ||
import {run} from "./utils.mjs"; | ||
|
||
(async () => { | ||
console.info("[ESM compile post-processing started]"); | ||
await run("resolve-tspaths", ["--project", "tsconfig.esm.json"]); | ||
console.info("Resolved TypeScript import paths"); | ||
console.info("[ESM compile post-processing ended]"); | ||
})(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import { spawn } from "child_process"; | ||
|
||
const run = (command, args) => { | ||
return new Promise((resolve, reject) => { | ||
const cmd = spawn(command, args, { | ||
stdio: ["ignore", "inherit", "inherit"], | ||
}); | ||
|
||
cmd.on("close", (code) => { | ||
if (!code) { | ||
resolve(); | ||
return; | ||
} | ||
|
||
reject(new Error(`Program exited with code ${code}`)); | ||
}); | ||
|
||
cmd.on("error", () => { | ||
reject(new Error(`Can't start program`)); | ||
}); | ||
}); | ||
}; | ||
|
||
export { | ||
run | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,23 @@ | ||
module.exports = { | ||
// testMatch: [], | ||
collectCoverageFrom: [ | ||
'src/**/*.{mjs,js,jsx,ts,tsx}', | ||
'!**/*.d.ts' | ||
], | ||
setupFiles: [ | ||
'<rootDir>/test/bootstrap.cjs' | ||
], | ||
testURL: 'http://localhost:8080', | ||
moduleNameMapper: { | ||
'^(.*)\.js$': '$1', | ||
}, | ||
"collectCoverageFrom": [ | ||
"src/**/*.{mjs,js,jsx,ts,tsx}", | ||
"!**/*.d.ts" | ||
], | ||
"setupFiles": [ | ||
"<rootDir>/test/bootstrap.cjs" | ||
], | ||
"moduleNameMapper": { | ||
"^(.*).js$": "$1" | ||
}, | ||
"testEnvironmentOptions": { | ||
"url": "http://localhost:8080" | ||
}, | ||
"transform": { | ||
"\\.[jt]sx?$": [ | ||
"babel-jest", | ||
{ | ||
"configFile": "./test/babel.config.cjs" | ||
} | ||
] | ||
} | ||
}; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,26 @@ | ||
{ | ||
"name": "oop-timers", | ||
"version": "5.0.0+", | ||
"version": "5.1.0", | ||
"repository": "[email protected]:dzek69/oop-timers.git", | ||
"author": "Jacek Nowacki", | ||
"license": "MIT", | ||
"scripts": { | ||
"test": "NODE_ENV=test jest", | ||
"docs": "typedoc src/index.ts --skipErrorChecking --out docs --includeVersion", | ||
"compile": "yarn compile:esm && yarn compile:cjs", | ||
"compile": "pnpm run compile:esm && pnpm run compile:cjs", | ||
"compile:esm": "rm -rf esm && tsc --project tsconfig.esm.json && node ./build-scripts/compile.esm.after.mjs", | ||
"compile:cjs": "rm -rf dist && tsc --project tsconfig.cjs.json && node ./build-scripts/compile.cjs.after.mjs", | ||
"typecheck": "tsc --noEmit", | ||
"lint": "eslint src --ext .ts,.tsx,.js,.jsx,.mjs", | ||
"lint:fix": "yarn lint --fix", | ||
"prepack": "yarn compile", | ||
"prepublishOnly": "yarn audit && yarn lint && yarn test && yarn docs", | ||
"lint:fix": "pnpm run lint --fix", | ||
"prepack": "pnpm run compile", | ||
"prepublishOnly": "pnpm audit && pnpm run lint && pnpm run test && pnpm run docs", | ||
"start:dev": "nodemon", | ||
"start:dev:compatibility": "TS_NODE_FILES=true yarn start:dev", | ||
"start:dev:compatibility": "TS_NODE_FILES=true pnpm run start:dev", | ||
"prepare": "husky install", | ||
"updates": "npx --yes npm-check-updates --dep prod", | ||
"updates:dev": "npx --yes npm-check-updates --dep dev", | ||
"updates:all": "npx --yes npm-check-updates" | ||
"updates": "pnpm dlx npm-check-updates --dep prod", | ||
"updates:dev": "pnpm dlx npm-check-updates --dep dev", | ||
"updates:all": "pnpm dlx npm-check-updates" | ||
}, | ||
"exports": { | ||
".": { | ||
|
@@ -35,37 +35,38 @@ | |
"type": "module", | ||
"dependencies": {}, | ||
"devDependencies": { | ||
"@babel/core": "^7.21.4", | ||
"@babel/preset-env": "^7.21.4", | ||
"@babel/preset-typescript": "^7.21.4", | ||
"@dzek69/eslint-config-base": "^2.4.0", | ||
"@dzek69/eslint-config-typescript": "^1.1.0", | ||
"@typescript-eslint/eslint-plugin": "^5.58.0", | ||
"@typescript-eslint/parser": "^5.58.0", | ||
"@babel/core": "^7.22.20", | ||
"@babel/preset-env": "^7.22.20", | ||
"@babel/preset-typescript": "^7.22.15", | ||
"@dzek69/eslint-config-base": "^2.5.0", | ||
"@dzek69/eslint-config-import": "^1.3.0", | ||
"@dzek69/eslint-config-import-typescript": "^1.0.1", | ||
"@dzek69/eslint-config-typescript": "^1.1.1", | ||
"@knodes/typedoc-plugin-pages": "^0.23.4", | ||
"@types/jest": "^29.5.5", | ||
"@typescript-eslint/eslint-plugin": "^5.61.0", | ||
"@typescript-eslint/parser": "^5.61.0", | ||
"babel-plugin-module-extension": "^0.1.3", | ||
"eslint": "^8.38.0", | ||
"eslint": "^8.44.0", | ||
"eslint-plugin-import": "^2.28.1", | ||
"fs-extra": "^11.1.1", | ||
"husky": "^8.0.3", | ||
"jest": "^29.5.0", | ||
"jest": "^29.7.0", | ||
"must": "^0.13.4", | ||
"nodemon": "^2.0.22", | ||
"nodemon": "^3.0.1", | ||
"prettier": "^2.8.8", | ||
"ts-node": "^10.9.1", | ||
"typedoc": "^0.23.0", | ||
"typescript": "^5.0.4", | ||
"@types/jest": "^29.5.0", | ||
"eslint-plugin-import": "^2.27.5", | ||
"@dzek69/eslint-config-import": "^1.2.0", | ||
"@dzek69/eslint-config-import-typescript": "^1.0.0", | ||
"@knodes/typedoc-plugin-pages": "^0.23.4", | ||
"prettier": "^2.8.7" | ||
"typescript": "^5.2.2", | ||
"resolve-tspaths": "^0.8.15" | ||
}, | ||
"husky": { | ||
"hooks": { | ||
"pre-push": "yarn prepublishOnly && yarn compile" | ||
"pre-push": "pnpm run prepublishOnly && pnpm run compile" | ||
} | ||
}, | ||
"libraryTemplate": { | ||
"version": "3.9.1", | ||
"version": "3.11.2", | ||
"language": "typescript", | ||
"fixDefaultForCommonJS": true, | ||
"jsx": false | ||
|
Oops, something went wrong.