Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix!: remove commonjs support from cspell-gitignore #4591

Merged
merged 1 commit into from
Jun 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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" }]
}