Skip to content

Commit e9f8e0a

Browse files
committed
Switch to nodenext for modules.
1 parent 6701646 commit e9f8e0a

16 files changed

+60
-60
lines changed

index.d.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export * from './esm6/';
1+
export * from './esm6/index.js';

src/augment-websocket.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { IStompSocket } from './types';
1+
import { IStompSocket } from './types.js';
22

33
/**
44
* @internal

src/client.ts

+7-7
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
import { ITransaction } from './i-transaction';
2-
import { StompConfig } from './stomp-config';
3-
import { StompHandler } from './stomp-handler';
4-
import { StompHeaders } from './stomp-headers';
5-
import { StompSubscription } from './stomp-subscription';
1+
import { ITransaction } from './i-transaction.js';
2+
import { StompConfig } from './stomp-config.js';
3+
import { StompHandler } from './stomp-handler.js';
4+
import { StompHeaders } from './stomp-headers.js';
5+
import { StompSubscription } from './stomp-subscription.js';
66
import {
77
ActivationState,
88
closeEventCallbackType,
@@ -13,8 +13,8 @@ import {
1313
messageCallbackType,
1414
StompSocketState,
1515
wsErrorCallbackType,
16-
} from './types';
17-
import { Versions } from './versions';
16+
} from './types.js';
17+
import { Versions } from './versions.js';
1818

1919
/**
2020
* @internal

src/compatibility/compat-client.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
import { Client } from '../client';
2-
import { StompHeaders } from '../stomp-headers';
3-
import { frameCallbackType, messageCallbackType } from '../types';
4-
import { HeartbeatInfo } from './heartbeat-info';
1+
import { Client } from '../client.js';
2+
import { StompHeaders } from '../stomp-headers.js';
3+
import { frameCallbackType, messageCallbackType } from '../types.js';
4+
import { HeartbeatInfo } from './heartbeat-info.js';
55

66
/**
77
* Available for backward compatibility, please shift to using {@link Client}.

src/compatibility/heartbeat-info.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { CompatClient } from './compat-client';
1+
import { CompatClient } from './compat-client.js';
22

33
/**
44
* Part of `@stomp/stompjs`.

src/compatibility/stomp.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import { Versions } from '../versions';
2-
import { CompatClient } from './compat-client';
3-
import { IStompSocket } from '../types';
1+
import { Versions } from '../versions.js';
2+
import { CompatClient } from './compat-client.js';
3+
import { IStompSocket } from '../types.js';
44

55
/**
66
* @internal

src/frame-impl.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
import { BYTE } from './byte';
2-
import { IFrame } from './i-frame';
3-
import { StompHeaders } from './stomp-headers';
4-
import { IRawFrameType } from './types';
1+
import { BYTE } from './byte.js';
2+
import { IFrame } from './i-frame.js';
3+
import { StompHeaders } from './stomp-headers.js';
4+
import { IRawFrameType } from './types.js';
55

66
/**
77
* Frame class represents a STOMP frame.

src/i-frame.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { StompHeaders } from './stomp-headers';
1+
import { StompHeaders } from './stomp-headers.js';
22

33
/**
44
* It represents a STOMP frame. Many of the callbacks pass an IFrame received from

src/i-message.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { IFrame } from './i-frame';
2-
import { StompHeaders } from './stomp-headers';
1+
import { IFrame } from './i-frame.js';
2+
import { StompHeaders } from './stomp-headers.js';
33

44
/**
55
* Instance of Message will be passed to [subscription callback]{@link Client#subscribe}

src/index.ts

+13-13
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1-
export * from './client';
2-
export * from './frame-impl';
3-
export * from './i-frame';
4-
export * from './i-message';
5-
export * from './parser';
6-
export * from './stomp-config';
7-
export * from './stomp-headers';
8-
export * from './stomp-subscription';
9-
export * from './i-transaction';
10-
export * from './types';
11-
export * from './versions';
1+
export * from './client.js';
2+
export * from './frame-impl.js';
3+
export * from './i-frame.js';
4+
export * from './i-message.js';
5+
export * from './parser.js';
6+
export * from './stomp-config.js';
7+
export * from './stomp-headers.js';
8+
export * from './stomp-subscription.js';
9+
export * from './i-transaction.js';
10+
export * from './types.js';
11+
export * from './versions.js';
1212

1313
// Compatibility code
14-
export * from './compatibility/compat-client';
15-
export * from './compatibility/stomp';
14+
export * from './compatibility/compat-client.js';
15+
export * from './compatibility/stomp.js';

src/parser.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { IRawFrameType } from './types';
1+
import { IRawFrameType } from './types.js';
22

33
/**
44
* @internal

src/stomp-config.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
import { StompHeaders } from './stomp-headers';
1+
import { StompHeaders } from './stomp-headers.js';
22
import {
33
ActivationState,
44
closeEventCallbackType,
55
debugFnType,
66
frameCallbackType,
77
messageCallbackType,
88
wsErrorCallbackType,
9-
} from './types';
10-
import { Versions } from './versions';
9+
} from './types.js';
10+
import { Versions } from './versions.js';
1111

1212
/**
1313
* Configuration options for STOMP Client, each key corresponds to

src/stomp-handler.ts

+11-11
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
import { BYTE } from './byte';
2-
import { Client } from './client';
3-
import { FrameImpl } from './frame-impl';
4-
import { IMessage } from './i-message';
5-
import { ITransaction } from './i-transaction';
6-
import { Parser } from './parser';
7-
import { StompHeaders } from './stomp-headers';
8-
import { StompSubscription } from './stomp-subscription';
1+
import { BYTE } from './byte.js';
2+
import { Client } from './client.js';
3+
import { FrameImpl } from './frame-impl.js';
4+
import { IMessage } from './i-message.js';
5+
import { ITransaction } from './i-transaction.js';
6+
import { Parser } from './parser.js';
7+
import { StompHeaders } from './stomp-headers.js';
8+
import { StompSubscription } from './stomp-subscription.js';
99
import {
1010
closeEventCallbackType,
1111
debugFnType,
@@ -17,9 +17,9 @@ import {
1717
messageCallbackType,
1818
StompSocketState,
1919
wsErrorCallbackType,
20-
} from './types';
21-
import { Versions } from './versions';
22-
import { augmentWebsocket } from './augment-websocket';
20+
} from './types.js';
21+
import { Versions } from './versions.js';
22+
import { augmentWebsocket } from './augment-websocket.js';
2323

2424
/**
2525
* The STOMP protocol handler

src/stomp-subscription.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { StompHeaders } from './stomp-headers';
1+
import { StompHeaders } from './stomp-headers.js';
22

33
/**
44
* Call [Client#subscribe]{@link Client#subscribe} to create a StompSubscription.

src/types.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
import { IFrame } from './i-frame';
2-
import { IMessage } from './i-message';
3-
import { StompHeaders } from './stomp-headers';
4-
import { Versions } from './versions';
1+
import { IFrame } from './i-frame.js';
2+
import { IMessage } from './i-message.js';
3+
import { StompHeaders } from './stomp-headers.js';
4+
import { Versions } from './versions.js';
55

66
/**
77
* This callback will receive a `string` as parameter.

tsconfig.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"compilerOptions": {
33
/* Basic Options */
4-
"target": "es2015", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017','ES2018' or 'ESNEXT'. */
5-
"module": "es2015", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */
4+
"target": "es2020", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017','ES2018' or 'ESNEXT'. */
5+
"module": "nodenext", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */
66
"lib": ["dom", "es2015"], /* Specify library files to be included in the compilation. */
77
// "allowJs": true, /* Allow javascript files to be compiled. */
88
// "checkJs": true, /* Report errors in .js files. */
@@ -36,7 +36,7 @@
3636
// "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */
3737

3838
/* Module Resolution Options */
39-
// "moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */
39+
"moduleResolution": "nodenext", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */
4040
// "baseUrl": "./", /* Base directory to resolve non-absolute module names. */
4141
// "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */
4242
// "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */

0 commit comments

Comments
 (0)