Skip to content

Commit

Permalink
fix esm dist
Browse files Browse the repository at this point in the history
  • Loading branch information
iccicci committed Jun 10, 2024
1 parent fcd561b commit 6f480bb
Show file tree
Hide file tree
Showing 6 changed files with 174 additions and 92 deletions.
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ env:
node_js:
- "20"
- "18"
- "16"

language: node_js
script: "yarn coverage"
Expand Down
2 changes: 1 addition & 1 deletion jest.config.js → jest.config.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ module.exports = {
collectCoverageFrom: ["index.ts"],
preset: "ts-jest",
testEnvironment: "jest-environment-node-single-context",
testSequencer: "./testSequencer.js"
testSequencer: "./testSequencer.cjs"
};
7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
"all": "npm run eslint && npm run coverage",
"coverage": "rm -rf dist && TZ=Europe/Rome jest --coverage --runInBand",
"eslint": "eslint index.ts utils.ts test/*ts",
"ignore": "ts-node utils.ts ignore",
"prepare": "npm run ignore && tsc -p tsconfig.cjs.json && tsc -p tsconfig.esm.json && tsc -p tsconfig.types.json",
"ignore": "tsx utils ignore",
"prepare": "npm run ignore && tsc -p tsconfig.cjs.json && echo '{\"type\":\"commonjs\"}' > dist/cjs/package.json && tsc -p tsconfig.esm.json && tsc -p tsconfig.types.json",
"test": "rm -rf dist && TZ=Europe/Rome jest --runInBand"
},
"bugs": "https://github.com/iccicci/rotating-file-stream/issues",
Expand Down Expand Up @@ -47,6 +47,7 @@
"types": "./dist/types/index.d.ts"
}
},
"type": "module",
"devDependencies": {
"@types/jest": "29.5.12",
"@types/node": "20.14.2",
Expand All @@ -58,7 +59,7 @@
"jest-environment-node-single-context": "29.4.0",
"prettier": "3.3.1",
"ts-jest": "29.1.4",
"ts-node": "10.9.2",
"tsx": "4.15.1",
"typescript": "5.4.5"
},
"prettier": {
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { writeFile } from "fs/promises";

const common: string[] = ["*gz", "*log", "*tmp", "*txt", ".gitignore", ".npmignore", "coverage", "node_modules", ""];
const git: string[] = ["dist"];
const npm: string[] = [".*", "CHANGELOG.md", "index.ts", "jest.config.js", "test", "tsconfig.*", "utils.ts"];
const npm: string[] = [".*", "CHANGELOG.md", "index.ts", "jest.config.cjs", "test", "testSequencer.cjs", "tsconfig.*", "utils.ts"];

if(process.argv[2] === "ignore") {
(async () => {
Expand Down
Loading

0 comments on commit 6f480bb

Please sign in to comment.