Skip to content

Commit

Permalink
Add explicit type in package.json
Browse files Browse the repository at this point in the history
  • Loading branch information
mokkabonna committed Sep 19, 2023
1 parent dc21f69 commit 66e7731
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/inquirer-autocomplete-standalone/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"description": "Standalone autocomplete cli prompt based on inquirer core",
"version": "0.3.0",
"main": "./dist/cjs/index.js",
"module": "./dist/esm/index.js",
"typings": "./dist/cjs/types/index.d.ts",
"files": [
"dist/**/*"
Expand Down Expand Up @@ -78,7 +79,7 @@
"pretest": "npm run lint",
"test": "vitest run test --coverage",
"tsc": "yarn run clean && yarn run tsc:esm && yarn run tsc:cjs",
"build": "yarn run tsc",
"build": "yarn run tsc && node ./scripts/build-module-fixup.js",
"clean": "rm -rf dist",
"tsc:esm": "tsc -p ./tsconfig.json",
"tsc:cjs": "tsc -p ./tsconfig.cjs.json",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { writeFile } from 'node:fs/promises';

Promise.all([
writeFile(
'./dist/esm/package.json',
JSON.stringify({ type: 'module' }, null, 2),
'utf8'
),
writeFile(
'./dist/cjs/package.json',
JSON.stringify({ type: 'commonjs' }, null, 2),
'utf8'
),
]);

0 comments on commit 66e7731

Please sign in to comment.