Skip to content

Commit

Permalink
fix!: remove commonjs support from cspell-gitignore (#4591)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jason3S authored Jun 27, 2023
1 parent 54a2c48 commit 71a3ffb
Show file tree
Hide file tree
Showing 10 changed files with 11 additions and 55 deletions.
2 changes: 1 addition & 1 deletion packages/cspell-gitignore/bin.mjs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env node

import * as app from './dist/esm/app.mjs';
import * as app from './dist/app.js';

app.run(process.argv);
15 changes: 5 additions & 10 deletions packages/cspell-gitignore/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,17 @@
"bin": {
"cspell-gitignore": "bin.mjs"
},
"type": "commonjs",
"main": "dist/cjs/index.js",
"types": "dist/cjs/index.d.ts",
"module": "dist/esm/index.mjs",
"type": "module",
"types": "dist/index.d.ts",
"module": "dist/index.js",
"exports": {
".": {
"import": "./dist/esm/index.mjs",
"require": "./dist/cjs/index.js"
"import": "./dist/index.js"
}
},
"files": [
"bin.mjs",
"dist",
"!dist/esm/**/*.js",
"!dist/esm/**/*.ts",
"!**/*.tsbuildInfo",
"!**/__mocks__",
"!**/test/**",
Expand All @@ -37,8 +33,7 @@
],
"scripts": {
"clean": "shx rm -rf dist temp coverage \"*.tsbuildInfo\"",
"build": "tsc -b . && ts2mjs dist/esm",
"build:esm": "tsc -p tsconfig.esm.json",
"build": "tsc -b .",
"clean-build": "pnpm run clean && pnpm run build",
"coverage": "pnpm coverage:vitest && pnpm coverage:fix",
"coverage:vitest": "vitest run --coverage",
Expand Down
13 changes: 0 additions & 13 deletions packages/cspell-gitignore/tsconfig.cjs.json

This file was deleted.

2 changes: 1 addition & 1 deletion packages/cspell-gitignore/tsconfig.esm.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"module": "ES2020",
"moduleResolution": "node16",
"rootDir": "src",
"outDir": "dist/esm",
"outDir": "dist",
"sourceMap": false,
"types": ["node"]
},
Expand Down
2 changes: 1 addition & 1 deletion packages/cspell-gitignore/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"files": [],
"references": [{ "path": "./tsconfig.cjs.json" }, { "path": "./tsconfig.esm.json" }]
"references": [{ "path": "./tsconfig.esm.json" }]
}
12 changes: 0 additions & 12 deletions test-packages/cspell-gitignore/test-cspell-gitignore/bin.cjs

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,11 @@
"description": "Pure testing package for cspell-gitignore. Its purpose is to verify cspell-gitignore dependencies.",
"private": true,
"bin": {
"test-cjs": "./bin.cjs",
"test-mjs": "./bin.mjs",
"test-rollup-cjs": "./bin.rollup.cjs",
"test-rollup-mjs": "./bin.rollup.mjs"
},
"type": "commonjs",
"type": "module",
"scripts": {
"clean": "shx rm -rf dist .rollup.cache",
"build": "pnpm build:ts && pnpm build:rollup",
Expand All @@ -18,7 +17,7 @@
"clean-build": "pnpm run clean && pnpm run build",
"compile": "tsc -b .",
"test": "pnpm test:unit && pnpm test:smoke",
"test:smoke": "node ./bin.mjs && node ./bin.cjs && node ./bin.rollup.mjs && node ./bin.rollup.cjs",
"test:smoke": "node ./bin.mjs && node ./bin.rollup.mjs && node ./bin.rollup.cjs",
"test:unit": "vitest run"
},
"author": "",
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"files": [],
"references": [{ "path": "./tsconfig.cjs.json" }, { "path": "./tsconfig.esm.json" }]
"references": [{ "path": "./tsconfig.esm.json" }]
}

0 comments on commit 71a3ffb

Please sign in to comment.