Skip to content

Commit 2030419

Browse files
authored
chore: add extension for nodenext (#2265)
1 parent 018e705 commit 2030419

File tree

80 files changed

+1473
-2633
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

80 files changed

+1473
-2633
lines changed

biome.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@
7777
"assist": {
7878
"actions": {
7979
"source": {
80-
"organizeImports": "on"
80+
"organizeImports": "off"
8181
}
8282
}
8383
}

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@
1515
"generatePackages": "pnpm dlx tsx ./scripts/generatePackages.ts",
1616
"generateGlobalSdkPackage": "pnpm dlx tsx ./scripts/updateGlobalSdkPackage.ts",
1717
"prebuild": "pnpm run generatePackages && pnpm run generateAlias && pnpm format",
18-
"build": "pnpm turbo build",
18+
"build:packages": "pnpm turbo run build",
19+
"fix-import-extensions": "pnpm dlx tsx ./scripts/fix-import-extensions.ts",
20+
"build": "pnpm run build:packages && pnpm run fix-import-extensions",
1921
"typecheck": "pnpm turbo typecheck",
2022
"build:profile": "cross-env PROFILE=true pnpm run build",
2123
"commit": "npx git-cz -a",

packages/client/src/bridge.ts

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
/** List all helpers required by APIs */
2-
export { isJSONObject } from './helpers/json'
2+
export { isJSONObject } from './helpers/json.js'
33
export {
44
resolveOneOf,
55
unmarshalArrayOfObject,
66
unmarshalDate,
77
unmarshalMapOfObject,
88
urlParams,
99
validatePathParam,
10-
} from './helpers/marshalling'
11-
export type { WaitForOptions } from './internal/async/interval-retrier'
12-
export { waitForResource } from './internal/async/interval-retrier'
13-
export { API } from './scw/api'
14-
export type { DefaultValues } from './scw/client-settings'
10+
} from './helpers/marshalling.js'
11+
export type { WaitForOptions } from './internal/async/interval-retrier.js'
12+
export { waitForResource } from './internal/async/interval-retrier.js'
13+
export { API } from './scw/api.js'
14+
export type { DefaultValues } from './scw/client-settings.js'
1515
export {
1616
marshalBlobToScwFile,
1717
marshalDecimal,
@@ -24,13 +24,13 @@ export {
2424
unmarshalServiceInfo,
2525
unmarshalTimeSeries,
2626
unmarshalTimeSeriesPoint,
27-
} from './scw/custom-marshalling'
27+
} from './scw/custom-marshalling.js'
2828
export type {
2929
Money,
3030
ScwFile,
3131
ServiceInfo,
3232
TimeSeries,
33-
} from './scw/custom-types'
34-
export { Decimal } from './scw/custom-types'
35-
export { enrichForPagination } from './scw/fetch/resource-paginator'
36-
export type { Region, Zone } from './scw/locality'
33+
} from './scw/custom-types.js'
34+
export { Decimal } from './scw/custom-types.js'
35+
export { enrichForPagination } from './scw/fetch/resource-paginator.js'
36+
export type { Region, Zone } from './scw/locality.js'

packages/client/src/helpers/__tests__/is-browser.browser.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// @vitest-environment jsdom
22
import { describe, expect, it } from 'vitest'
3-
import { isBrowser } from '../is-browser'
3+
import { isBrowser } from '../is-browser.js'
44

55
describe('isBrowser', () => {
66
it('returns true by default', () => {

packages/client/src/helpers/__tests__/is-browser.node.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// @vitest-environment node
22

33
import { describe, expect, it } from 'vitest'
4-
import { isBrowser } from '../is-browser'
4+
import { isBrowser } from '../is-browser.js'
55

66
describe('isBrowser', () => {
77
it('returns false by default', () => {

packages/client/src/helpers/__tests__/json.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { describe, expect, test } from 'vitest'
2-
import { isJSON, isJSONObject } from '../json'
2+
import { isJSON, isJSONObject } from '../json.js'
33

44
describe('isJSON', () => {
55
test.each(['str', 200, true, null, [true, 'two', 3], { key: 'value' }])(

packages/client/src/helpers/__tests__/marshalling.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
import { describe, expect, it } from 'vitest'
2-
import { isJSONObject } from '../json'
2+
import { isJSONObject } from '../json.js'
33
import {
44
resolveOneOf,
55
unmarshalArrayOfObject,
66
unmarshalDate,
77
unmarshalMapOfObject,
88
urlParams,
99
validatePathParam,
10-
} from '../marshalling'
10+
} from '../marshalling.js'
1111

1212
describe('validatePathParam', () => {
1313
it('returns parameter for a non-empty string', () => {

packages/client/src/index.ts

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,32 @@
11
export type {
22
WaitForOptions,
33
WaitForStopCondition,
4-
} from './internal/async/interval-retrier'
4+
} from './internal/async/interval-retrier.js'
55
export type {
66
NetworkInterceptors,
77
RequestInterceptor,
88
ResponseErrorInterceptor,
99
ResponseInterceptor,
10-
} from './internal/interceptors/types'
10+
} from './internal/interceptors/types.js'
1111
export { enableConsoleLogger, setLogger } from './internal/logger'
12-
export type { Logger } from './internal/logger/logger'
13-
export * from './internals'
14-
export type { Client } from './scw/client'
15-
export { createAdvancedClient, createClient } from './scw/client'
16-
export type { ClientConfig } from './scw/client-ini-factory'
12+
export type { Logger } from './internal/logger/logger.js'
13+
export * from './internals.js'
14+
export type { Client } from './scw/client.js'
15+
export { createAdvancedClient, createClient } from './scw/client.js'
16+
export type { ClientConfig } from './scw/client-ini-factory.js'
1717
export {
1818
withAdditionalInterceptors,
1919
withDefaultPageSize,
2020
withHTTPClient,
2121
withProfile,
2222
withUserAgent,
2323
withUserAgentSuffix,
24-
} from './scw/client-ini-factory'
25-
export type { Profile } from './scw/client-ini-profile'
26-
export type { Settings } from './scw/client-settings'
27-
export { AUTH_HEADER_KEY, SESSION_HEADER_KEY } from './scw/constants'
28-
export type { Money, ScwFile, TimeSeries } from './scw/custom-types'
29-
export { Decimal } from './scw/custom-types'
24+
} from './scw/client-ini-factory.js'
25+
export type { Profile } from './scw/client-ini-profile.js'
26+
export type { Settings } from './scw/client-settings.js'
27+
export { AUTH_HEADER_KEY, SESSION_HEADER_KEY } from './scw/constants.js'
28+
export type { Money, ScwFile, TimeSeries } from './scw/custom-types.js'
29+
export { Decimal } from './scw/custom-types.js'
3030
export * as Errors from './scw/errors/standard'
31-
export type { ApiLocality, Region, Zone } from './scw/locality'
32-
export { toApiLocality } from './scw/locality'
31+
export type { ApiLocality, Region, Zone } from './scw/locality.js'
32+
export { toApiLocality } from './scw/locality.js'

packages/client/src/internal/async/__tests__/interval-retrier.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ import {
55
createFixedIntervalStrategy,
66
tryAtIntervals,
77
waitForResource,
8-
} from '../interval-retrier'
9-
import { sleep } from '../sleep'
8+
} from '../interval-retrier.js'
9+
import { sleep } from '../sleep.js'
1010

1111
describe('createFixedIntervalStrategy', () => {
1212
it('always returns the same interval', () => {

packages/client/src/internal/async/__tests__/sleep.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { afterAll, beforeAll, describe, expect, it, vi } from 'vitest'
2-
import { sleep } from '../sleep'
2+
import { sleep } from '../sleep.js'
33

44
beforeAll(() => {
55
vi.useFakeTimers()

0 commit comments

Comments
 (0)