Skip to content

Commit 5a773df

Browse files
committed
fix: support esm projects
1 parent 9f60fd4 commit 5a773df

18 files changed

Lines changed: 47 additions & 18 deletions

File tree

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"$schema": "https://biomejs.dev/schemas/2.2.5/schema.json",
3+
"extends": "//",
4+
"linter": {
5+
"includes": [
6+
"**"
7+
]
8+
}
9+
}

integration-tests/typescript-angular/tsconfig.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
"sourceMap": true,
1717
"declaration": false,
1818
"experimentalDecorators": true,
19+
"rewriteRelativeImportExtensions": true,
1920
"moduleResolution": "bundler",
2021
"target": "ES2022",
2122
"module": "ES2022"

integration-tests/typescript-axios/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
"author": "Michael Nahkies",
66
"license": "MIT",
77
"private": true,
8+
"type": "module",
89
"scripts": {
910
"clean": "rm -rf ./dist && rm -rf ./src/generated",
1011
"validate": "tsc -p ./tsconfig.json"

integration-tests/typescript-axios/src/audit-github-repositories.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ import axios, {type AxiosResponse, isAxiosError} from "axios"
66
import {
77
ApiClient,
88
GitHubV3RestApiServers,
9-
} from "./generated/api.github.com.yaml/client"
10-
import type {t_repository} from "./generated/api.github.com.yaml/models"
9+
} from "./generated/api.github.com.yaml/client.ts"
10+
import type {t_repository} from "./generated/api.github.com.yaml/models.ts"
1111

1212
const client = new ApiClient({
1313
axios: axios.create({

integration-tests/typescript-axios/src/uniform-github-repositories.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ import dotenv from "dotenv"
33
dotenv.config()
44

55
import axios from "axios"
6-
import {ApiClient} from "./generated/api.github.com.yaml/client"
7-
import type {t_repository} from "./generated/api.github.com.yaml/models"
6+
import {ApiClient} from "./generated/api.github.com.yaml/client.ts"
7+
import type {t_repository} from "./generated/api.github.com.yaml/models.ts"
88

99
const client = new ApiClient({
1010
axios: axios.create({

integration-tests/typescript-axios/tsconfig.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@
66
"rootDir": "./src",
77
/* exercise the code path where exactOptionalPropertyTypes is enabled */
88
"exactOptionalPropertyTypes": true,
9-
"noUnusedLocals": true
9+
"noUnusedLocals": true,
10+
"verbatimModuleSyntax": true,
11+
"rewriteRelativeImportExtensions": true
12+
1013
}
1114
}

integration-tests/typescript-express/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
"author": "Michael Nahkies",
66
"license": "MIT",
77
"private": true,
8+
"type": "module",
89
"scripts": {
910
"clean": "rm -rf ./dist && rm -rf ./src/generated",
1011
"validate": "tsc -p ./tsconfig.json"

integration-tests/typescript-express/tsconfig.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@
66
"types": [],
77
/* exercise the code path where exactOptionalPropertyTypes is enabled */
88
"exactOptionalPropertyTypes": true,
9-
"noUnusedLocals": true
9+
"verbatimModuleSyntax": true,
10+
"noUnusedLocals": true,
11+
"rewriteRelativeImportExtensions": true
12+
1013
}
1114
}

integration-tests/typescript-fetch/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
"clean": "rm -rf ./dist && rm -rf ./src/generated",
1010
"validate": "tsc -p ./tsconfig.json"
1111
},
12+
"type": "module",
1213
"dependencies": {
1314
"@nahkies/typescript-fetch-runtime": "workspace:*",
1415
"dotenv": "^17.2.3",

integration-tests/typescript-fetch/src/generate-release-notes.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import path from "node:path"
33
import {
44
GitHubV3RestApi,
55
GitHubV3RestApiServers,
6-
} from "./generated/api.github.com.yaml/client"
6+
} from "./generated/api.github.com.yaml/client.ts"
77

88
function formatDate(dateStr: string | null) {
99
if (!dateStr) return ""

0 commit comments

Comments
 (0)