Skip to content

Commit 110ad4e

Browse files
committed
chore: add extension for nodenext
1 parent ab7dde5 commit 110ad4e

File tree

251 files changed

+1980
-2716
lines changed

Some content is hidden

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

251 files changed

+1980
-2716
lines changed

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 --filter=packages/* --filter=packages_generated/*",
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,16 +1,16 @@
11
/** List all helpers required by APIs */
2-
export { isJSONObject } from './helpers/json'
3-
export { waitForResource } from './internal/async/interval-retrier'
4-
export type { WaitForOptions } from './internal/async/interval-retrier'
5-
export { API } from './scw/api'
6-
export type { DefaultValues } from './scw/client-settings'
2+
export { isJSONObject } from './helpers/json.js'
3+
export { waitForResource } from './internal/async/interval-retrier.js'
4+
export type { WaitForOptions } from './internal/async/interval-retrier.js'
5+
export { API } from './scw/api.js'
6+
export type { DefaultValues } from './scw/client-settings.js'
77
export type {
88
Money,
99
ServiceInfo,
1010
ScwFile,
1111
TimeSeries,
12-
} from './scw/custom-types'
13-
export { Decimal } from './scw/custom-types'
12+
} from './scw/custom-types.js'
13+
export { Decimal } from './scw/custom-types.js'
1414
export {
1515
marshalScwFile,
1616
marshalMoney,
@@ -23,14 +23,14 @@ export {
2323
unmarshalTimeSeries,
2424
unmarshalTimeSeriesPoint,
2525
unmarshalDecimal,
26-
} from './scw/custom-marshalling'
27-
export { enrichForPagination } from './scw/fetch/resource-paginator'
28-
export type { Region, Zone } from './scw/locality'
26+
} from './scw/custom-marshalling.js'
27+
export { enrichForPagination } from './scw/fetch/resource-paginator.js'
28+
export type { Region, Zone } from './scw/locality.js'
2929
export {
3030
resolveOneOf,
3131
unmarshalDate,
3232
unmarshalArrayOfObject,
3333
unmarshalMapOfObject,
3434
urlParams,
3535
validatePathParam,
36-
} from './helpers/marshalling'
36+
} from './helpers/marshalling.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: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,33 @@
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
ResponseInterceptor,
99
ResponseErrorInterceptor,
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 { createClient, createAdvancedClient } from './scw/client'
14-
export { AUTH_HEADER_KEY, SESSION_HEADER_KEY } from './scw/constants'
15-
export type { Client } from './scw/client'
16-
export type { Profile } from './scw/client-ini-profile'
17-
export type { Settings } from './scw/client-settings'
12+
export type { Logger } from './internal/logger/logger.js'
13+
export { createClient, createAdvancedClient } from './scw/client.js'
14+
export { AUTH_HEADER_KEY, SESSION_HEADER_KEY } from './scw/constants.js'
15+
export type { Client } from './scw/client.js'
16+
export type { Profile } from './scw/client-ini-profile.js'
17+
export type { Settings } from './scw/client-settings.js'
1818
export {
1919
withAdditionalInterceptors,
2020
withDefaultPageSize,
2121
withHTTPClient,
2222
withProfile,
2323
withUserAgent,
2424
withUserAgentSuffix,
25-
} from './scw/client-ini-factory'
26-
export type { ClientConfig } from './scw/client-ini-factory'
27-
export { Decimal } from './scw/custom-types'
28-
export type { Money, ScwFile, TimeSeries } from './scw/custom-types'
25+
} from './scw/client-ini-factory.js'
26+
export type { ClientConfig } from './scw/client-ini-factory.js'
27+
export { Decimal } from './scw/custom-types.js'
28+
export type { Money, ScwFile, TimeSeries } from './scw/custom-types.js'
2929
export * as Errors from './scw/errors/standard'
30-
export type { Region, Zone } from './scw/locality'
31-
export * from './internals'
32-
export { toApiLocality } from './scw/locality'
33-
export type { ApiLocality } from './scw/locality'
30+
export type { Region, Zone } from './scw/locality.js'
31+
export * from './internals.js'
32+
export { toApiLocality } from './scw/locality.js'
33+
export type { ApiLocality } 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()

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { sleep } from './sleep'
1+
import { sleep } from './sleep.js'
22

33
const DEFAULT_TIMEOUT_SECONDS = 300
44
const DEFAULT_MIN_DELAY_SECONDS = 1

0 commit comments

Comments
 (0)