-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
=! compression is now done using Node's native zlib module, this requ…
…ires Node v12 at least ! `--glob-skip-br-extension` option not working ! some compression crashes on newer Node versions = default window size (compression option) set to 24 (was 0) ~ huge deps upgrade ~ huge cleanup
- Loading branch information
Showing
30 changed files
with
5,669 additions
and
5,265 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 |
---|---|---|
|
@@ -7,3 +7,6 @@ | |
/*.tgz | ||
*.log | ||
*.tsbuildinfo | ||
|
||
/test/words/* | ||
!/test/words/generate.py |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
*.js | ||
*.ts | ||
*.tsx |
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 @@ | ||
{} |
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
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 |
---|---|---|
@@ -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,68 +1,80 @@ | ||
{ | ||
"name": "brotli-cli", | ||
"version": "1.0.4", | ||
"version": "2.0.0", | ||
"repository": "[email protected]:dzek69/brotli-cli.git", | ||
"homepage": "https://github.com/dzek69/brotli-cli", | ||
"author": "Jacek Nowacki", | ||
"license": "MIT", | ||
"scripts": { | ||
"test": "NODE_ENV=test jest", | ||
"docs": "typedoc src/index.ts --skipErrorChecking --out docs --includeVersion --pluginPages ./pagesconfig.json", | ||
"compile": "yarn compile:cjs", | ||
"docs": "typedoc src/index.ts --skipErrorChecking --out docs --includeVersion", | ||
"compile": "pnpm run compile:cjs", | ||
"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" | ||
}, | ||
"bin": "./dist/index.js", | ||
"type": "module", | ||
"dependencies": { | ||
"better-custom-error": "^4.0.5", | ||
"brotli": "^1.3.3", | ||
"@ezez/errors": "^6.0.2", | ||
"fast-glob": "^3.2.12", | ||
"yargs": "^16.2.0" | ||
"queue-system": "^4.1.1", | ||
"yargs": "^17.7.2" | ||
}, | ||
"devDependencies": { | ||
"@babel/core": "^7.19.3", | ||
"@babel/preset-env": "^7.19.3", | ||
"@babel/preset-typescript": "^7.18.6", | ||
"@dzek69/eslint-config-base": "^2.3.0", | ||
"@dzek69/eslint-config-typescript": "^1.0.2", | ||
"@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/brotli": "^1.3.0", | ||
"@typescript-eslint/eslint-plugin": "^5.38.1", | ||
"@typescript-eslint/parser": "^5.38.1", | ||
"eslint": "^8.24.0", | ||
"fs-extra": "^10.1.0", | ||
"husky": "^8.0.1", | ||
"jest": "^29.1.1", | ||
"@types/jest": "^29.5.5", | ||
"@types/yargs": "^17.0.32", | ||
"@typescript-eslint/eslint-plugin": "^5.61.0", | ||
"@typescript-eslint/parser": "^5.61.0", | ||
"babel-plugin-module-extension": "^0.1.3", | ||
"eslint": "^8.44.0", | ||
"eslint-plugin-import": "^2.28.1", | ||
"fs-extra": "^11.1.1", | ||
"husky": "^8.0.3", | ||
"jest": "^29.7.0", | ||
"must": "^0.13.4", | ||
"nodemon": "^2.0.20", | ||
"nodemon": "^3.0.1", | ||
"prettier": "^2.8.8", | ||
"resolve-tspaths": "^0.8.15", | ||
"ts-node": "^10.9.1", | ||
"typedoc": "^0.23.15", | ||
"typescript": "^4.7.4", | ||
"babel-plugin-module-extension": "^0.1.3", | ||
"@types/jest": "^29.0.3", | ||
"eslint-plugin-import": "^2.26.0", | ||
"@dzek69/eslint-config-import": "^1.0.0", | ||
"@dzek69/eslint-config-import-typescript": "^1.0.0", | ||
"@knodes/typedoc-plugin-pages": "^0.23.1" | ||
"typedoc": "^0.23.0", | ||
"typescript": "^5.2.2" | ||
}, | ||
"husky": { | ||
"hooks": { | ||
"pre-push": "yarn prepublishOnly && yarn compile" | ||
"pre-push": "pnpm run prepublishOnly && pnpm run compile" | ||
} | ||
}, | ||
"libraryTemplate": { | ||
"version": "3.6.0", | ||
"version": "3.11.2", | ||
"language": "typescript", | ||
"fixDefaultForCommonJS": true, | ||
"jsx": false | ||
}, | ||
"exports": { | ||
".": { | ||
"types": "./esm/index.d.ts" | ||
} | ||
}, | ||
"engines": { | ||
"node": ">=12.0.0" | ||
} | ||
} |
Oops, something went wrong.