Skip to content

Commit

Permalink
Merge pull request #8 from tsastro/4-module-setup-changes
Browse files Browse the repository at this point in the history
some further tweaks to setup - this is what is published as 18.1.0
  • Loading branch information
pahjbo authored Sep 26, 2024
2 parents 42dd5de + c100afa commit e231ae1
Show file tree
Hide file tree
Showing 7 changed files with 155 additions and 102 deletions.
19 changes: 12 additions & 7 deletions jest.config.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,20 @@
// jest.config.ts
import { createDefaultEsmPreset, type JestConfigWithTsJest } from 'ts-jest'
/**
* For a detailed explanation regarding each configuration property, visit:
* https://jestjs.io/docs/configuration
*/

const defaultEsmPreset = createDefaultEsmPreset()
import type {Config} from 'jest';

const jestConfig: JestConfigWithTsJest = {
// [...]
...defaultEsmPreset,
const jestConfig: Config = {
clearMocks: true,
testEnvironment: "node",
preset: "ts-jest",
transform: {
"^.+.(t|j)sx?$": ["ts-jest",{}],
},
moduleNameMapper: {
'^(\\.{1,2}/.*)\\.js$': '$1',
},

}

export default jestConfig
9 changes: 6 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"doc": "typedoc src/main/ts/TSOFA.ts",
"eslint": "eslint ."
},
"main": "dist/TSOFA.js",
"exports": "./dist/TSOFA.js",
"types": "dist/TSOFA.d.ts",
"files": [
"/dist"
Expand All @@ -33,11 +33,14 @@
},
"homepage": "https://github.com/tsastro/tsofa#readme",
"devDependencies": {
"@eslint/js": "^9.9.1",
"@eslint/js": "^8.57.0",
"@jest/globals": "^29.7.0",
"@tsconfig/node22": "^22.0.0",
"@types/jest": "^29.5.12",
"@types/node": "^20.7.1",
"@typescript-eslint/eslint-plugin": "^6.17.0",
"@typescript-eslint/parser": "^6.17.0",
"eslint": "^9.9.1",
"eslint": "^8.57.0",
"eslint-plugin-import": "^2.28.1",
"eslint-plugin-jsdoc": "^46.8.1",
"eslint-plugin-prefer-arrow": "^1.2.3",
Expand Down
2 changes: 1 addition & 1 deletion src/main/ts/TSOFAFailedConvergenceException.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* Generated from Java with JSweet 3.1.0 - http://www.jsweet.org */

import { TSOFAException } from "./TSOFAException";
import { TSOFAException } from "./TSOFAException.js";
/**
* Exception reporting some form of convergence failure in an algorithm.
* @param {string} message
Expand Down
2 changes: 1 addition & 1 deletion src/main/ts/TSOFAIllegalParameter.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* Generated from Java with JSweet 3.1.0 - http://www.jsweet.org */
import { TSOFAException } from "./TSOFAException";
import { TSOFAException } from "./TSOFAException.js";
/**
* Various forms of illegal parameters are reported with this execption.
* .
Expand Down
2 changes: 1 addition & 1 deletion src/main/ts/TSOFAInternalError.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* Generated from Java with JSweet 3.1.0 - http://www.jsweet.org */
import { TSOFAException } from "./TSOFAException";
import { TSOFAException } from "./TSOFAException.js";
/**
* Exception signalling a internal error.
* .
Expand Down
19 changes: 9 additions & 10 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
{
"$schema": "https://json.schemastore.org/tsconfig",
"display": "Node 22",
"_version": "22.4.0",
"compilerOptions": {
"module": "ESNext",
"target": "ES2020",
"module": "NodeNext",
"target":"ES2020",
"declaration": true,
"sourceMap": true,
"declarationMap": true,
"allowJs": true,
"esModuleInterop": true,
"strict": false,
"moduleResolution": "Node",
"experimentalDecorators": true,
"moduleResolution": "NodeNext",
"isolatedModules": true,
"outDir": "./dist"
},
"include": [
"src/main/ts/**/*"
]
}
"include": ["src/main/ts/**/*"]
}
Loading

0 comments on commit e231ae1

Please sign in to comment.