-
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.
- upgraded ts-library-template (yarn -> pnpm, deps, support for paths…
…, etc.)
- Loading branch information
Showing
14 changed files
with
5,655 additions
and
5,225 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
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 was deleted.
Oops, something went wrong.
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,4 +1,8 @@ | ||
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 |
---|---|---|
@@ -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,23 +1,23 @@ | ||
{ | ||
"name": "@ezez/hooks", | ||
"version": "1.1.3", | ||
"version": "1.1.3+", | ||
"repository": "[email protected]:dzek69/ezez-hooks.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 compile:esm && pnpm 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 lint --fix", | ||
"prepack": "pnpm compile", | ||
"prepublishOnly": "pnpm audit && pnpm lint && pnpm test && pnpm docs", | ||
"prepare": "husky install", | ||
"start:dev": "next dev", | ||
"start:dev:compatibility": "TS_NODE_FILES=true yarn start:dev", | ||
"start:dev:compatibility": "TS_NODE_FILES=true pnpm start:dev", | ||
"updates": "npx --yes npm-check-updates --dep prod", | ||
"updates:dev": "npx --yes npm-check-updates --dep dev", | ||
"updates:all": "npx --yes npm-check-updates" | ||
|
@@ -37,46 +37,47 @@ | |
"react-dom": "^18.2.0" | ||
}, | ||
"devDependencies": { | ||
"@babel/core": "^7.22.1", | ||
"@babel/preset-env": "^7.22.4", | ||
"@babel/preset-typescript": "^7.21.5", | ||
"@dzek69/eslint-config-base": "^2.4.0", | ||
"@dzek69/eslint-config-import": "^1.2.0", | ||
"@dzek69/eslint-config-import-typescript": "^1.0.0", | ||
"@babel/core": "^7.22.8", | ||
"@babel/preset-env": "^7.22.7", | ||
"@babel/preset-typescript": "^7.22.5", | ||
"@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-react": "^1.2.2", | ||
"@dzek69/eslint-config-typescript": "^1.1.0", | ||
"@dzek69/eslint-config-typescript": "^1.1.1", | ||
"@ezez/utils": "^1.8.0", | ||
"@knodes/typedoc-plugin-pages": "^0.23.4", | ||
"@types/jest": "^29.5.2", | ||
"@types/react": "^18.2.8", | ||
"@types/react-dom": "^18.2.4", | ||
"@typescript-eslint/eslint-plugin": "^5.58.0", | ||
"@typescript-eslint/parser": "^5.58.0", | ||
"@typescript-eslint/eslint-plugin": "^5.61.0", | ||
"@typescript-eslint/parser": "^5.61.0", | ||
"babel-plugin-module-extension": "^0.1.3", | ||
"babel-plugin-module-resolver": "^5.0.0", | ||
"eslint": "^8.38.0", | ||
"eslint": "^8.44.0", | ||
"eslint-plugin-import": "^2.27.5", | ||
"eslint-plugin-react": "^7.24.0", | ||
"eslint-plugin-react-hooks": "^4.6.0", | ||
"fs-extra": "^11.1.1", | ||
"husky": "^8.0.3", | ||
"jest": "^29.5.0", | ||
"jest": "^29.6.1", | ||
"must": "^0.13.4", | ||
"next": "^13.4.4", | ||
"next": "^13.4.9", | ||
"nodemon": "^2.0.22", | ||
"prettier": "^2.8.8", | ||
"sass": "^1.35.2", | ||
"ts-node": "^10.9.1", | ||
"typedoc": "^0.23.28", | ||
"typescript": "^5.1.3" | ||
"typescript": "^5.1.3", | ||
"resolve-tspaths": "^0.8.14" | ||
}, | ||
"husky": { | ||
"hooks": { | ||
"pre-push": "yarn prepublishOnly && yarn compile" | ||
"pre-push": "pnpm prepublishOnly && pnpm compile" | ||
} | ||
}, | ||
"libraryTemplate": { | ||
"version": "3.10.0", | ||
"version": "3.11.1", | ||
"language": "typescript", | ||
"fixDefaultForCommonJS": true, | ||
"jsx": true | ||
|
Oops, something went wrong.