Skip to content

Commit 5b660e9

Browse files
committed
update packaging
1 parent 9e4c1cb commit 5b660e9

File tree

5 files changed

+55
-9
lines changed

5 files changed

+55
-9
lines changed

dist/main.js renamed to bin/main.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#!/usr/bin/env node
2+
"use strict";
23
var __create = Object.create;
34
var __defProp = Object.defineProperty;
45
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
@@ -4416,7 +4417,7 @@ async function findUp(name, options = {}) {
44164417
return matches[0];
44174418
}
44184419

4419-
// src/main.js
4420+
// src/main.mjs
44204421
var import_promises = __toESM(require("fs/promises"), 1);
44214422
var import_node_path3 = __toESM(require("path"), 1);
44224423
var import_node_readline = __toESM(require("readline"), 1);

package.json

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,17 +18,16 @@
1818
},
1919
"license": "MIT",
2020
"author": "Michael Shick <[email protected]>",
21-
"type": "module",
22-
"main": "./src/main.js",
21+
"main": "./src/main.mjs",
2322
"bin": {
24-
"typescript-jest-junit-reporter": "dist/main.js"
23+
"typescript-jest-junit-reporter": "bin/main.js"
2524
},
2625
"scripts": {
27-
"build": "del-cli dist && esbuild src/main.js --bundle --platform=node --target=es2022 --main-fields=module,main --banner:js='#!/usr/bin/env node' --outdir=dist",
28-
"format": "eslint src --fix",
26+
"build": "del-cli dist && esbuild src/main.mjs --bundle --platform=node --target=es2022 --main-fields=module,main --banner:js='#!/usr/bin/env node' --outdir=bin",
27+
"format": "eslint src --fix --ext .mjs,.js,.json",
2928
"prepare": "npm run build",
3029
"release": "np --no-publish",
31-
"test": "npm run format && SCRIPT_PATH=../dist/main.js ./tests/test.sh"
30+
"test": "npm run format && SCRIPT_PATH=../bin/main.js ./tests/test.sh"
3231
},
3332
"prettier": {
3433
"bracketSpacing": true,
@@ -89,7 +88,9 @@
8988
]
9089
},
9190
"eslintIgnore": [
92-
"dist"
91+
"dist",
92+
"tsconfig.json",
93+
"package-lock.json"
9394
],
9495
"optionalDependencies": {
9596
"@types/node": "^20.11.18",
@@ -104,6 +105,7 @@
104105
"find-up": "^6.3.0",
105106
"np": "9.0.0",
106107
"prettier": "^3.2.5",
108+
"typescript": "^5.3.3",
107109
"xmlbuilder": "15.1.1"
108110
},
109111
"engines": {
File renamed without changes.

tests/test.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/sh
22

3-
SCRIPT_PATH='../src/main.js'
3+
SCRIPT_PATH='../src/main.mjs'
44

55
cd tests
66

tsconfig.json

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
{
2+
"compilerOptions": {
3+
"outDir": "dist",
4+
"allowJs": true,
5+
"allowSyntheticDefaultImports": true,
6+
"allowUnreachableCode": true,
7+
"allowUnusedLabels": false,
8+
"declaration": true,
9+
"declarationMap": true,
10+
"esModuleInterop": true,
11+
"forceConsistentCasingInFileNames": true,
12+
"isolatedModules": true,
13+
"module": "Node16",
14+
"moduleResolution": "Node16",
15+
"newLine": "lf",
16+
"noFallthroughCasesInSwitch": true,
17+
"noImplicitReturns": false,
18+
"noImplicitOverride": true,
19+
"noPropertyAccessFromIndexSignature": false,
20+
"noUnusedLocals": false,
21+
"noUnusedParameters": false,
22+
"noUncheckedIndexedAccess": false,
23+
"pretty": true,
24+
"resolveJsonModule": false,
25+
"skipLibCheck": true,
26+
"sourceMap": true,
27+
"strict": true,
28+
"target": "ES2022",
29+
"useDefineForClassFields": true,
30+
"useUnknownInCatchVariables": false,
31+
"lib": [
32+
"ES2022"
33+
]
34+
},
35+
"include": [
36+
"src",
37+
],
38+
"exclude": [
39+
"node_modules",
40+
"dist",
41+
"bin"
42+
]
43+
}

0 commit comments

Comments
 (0)