Skip to content

Commit 9d5a5dd

Browse files
authored
Merge pull request #1026 from forcedotcom/mz/make-bundleable
Mz/make bundleable
2 parents 9e32558 + d2dda3e commit 9d5a5dd

19 files changed

+30
-26
lines changed

examples/test/tsconfig.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
"compilerOptions": {
55
"noEmit": true,
66
"skipLibCheck": true,
7-
"resolveJsonModule": true
7+
"resolveJsonModule": true,
8+
"esModuleInterop": true
89
}
910
}

src/deviceOauthService.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import Transport from 'jsforce/lib/transport';
1111
import { AsyncCreatable, Duration, parseJsonMap, sleep } from '@salesforce/kit';
1212
import { HttpRequest, OAuth2Config } from 'jsforce';
1313
import { ensureString, isString, JsonMap, Nullable } from '@salesforce/ts-types';
14-
import * as FormData from 'form-data';
14+
import FormData from 'form-data';
1515
import { Logger } from './logger/logger';
1616
import { AuthInfo, DEFAULT_CONNECTED_APP_INFO } from './org/authInfo';
1717
import { SFDX_HTTP_HEADERS } from './org/connection';

src/status/streamingClient.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
import { resolve as resolveUrl } from 'node:url';
1111
import { AsyncOptionalCreatable, Duration, Env, env, set } from '@salesforce/kit/lib';
1212
import { AnyFunction, AnyJson, ensure, ensureString, JsonMap } from '@salesforce/ts-types/lib';
13-
import * as Faye from 'faye';
13+
import Faye from 'faye';
1414
import { Logger } from '../logger/logger';
1515
import { Org } from '../org/org';
1616
import { SfError } from '../sfError';

src/util/zipWriter.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
*/
77

88
import { Readable, Writable } from 'node:stream';
9-
import * as JSZip from 'jszip';
9+
import JSZip from 'jszip';
1010
import { Logger } from '../logger/logger';
1111
import { SfError } from '../sfError';
1212
import { StructuredWriter } from './structuredWriter';

test/tsconfig.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
"compilerOptions": {
55
"noEmit": true,
66
"skipLibCheck": true,
7-
"resolveJsonModule": true
7+
"resolveJsonModule": true,
8+
"esModuleInterop": true
89
}
910
}

test/unit/config/configAggregatorTest.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
*/
77
/* eslint-disable @typescript-eslint/no-unsafe-member-access */
88
/* eslint-disable @typescript-eslint/no-unsafe-call */
9-
import * as fs from 'node:fs';
9+
import fs from 'node:fs';
1010
import { assert, expect, config as chaiConfig } from 'chai';
1111
import { Config, ConfigProperties, SFDX_ALLOWED_PROPERTIES, SfdxPropertyKeys } from '../../../src/config/config';
1212
import { ConfigAggregator, ConfigInfo } from '../../../src/config/configAggregator';

test/unit/config/configFileTest.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@
77
/* eslint-disable @typescript-eslint/no-unsafe-member-access */
88
/* eslint-disable @typescript-eslint/no-unsafe-call */
99

10-
import * as Path from 'node:path';
11-
import * as fs from 'node:fs';
10+
import Path from 'node:path';
11+
import fs from 'node:fs';
1212
import { expect } from 'chai';
1313

1414
import { assert } from '@salesforce/ts-types';
15-
import * as lockfileLib from 'proper-lockfile';
15+
import lockfileLib from 'proper-lockfile';
1616
import { ConfigFile } from '../../../src/config/configFile';
1717
import { SfError } from '../../../src/exported';
1818
import { shouldThrow, TestContext } from '../../../src/testSetup';

test/unit/crypto/cryptoKeyFailuresTest.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66
*/
77
/* eslint-disable @typescript-eslint/no-unsafe-member-access */
88

9-
import * as childProcess from 'node:child_process';
10-
import * as _crypto from 'node:crypto';
11-
import * as os from 'node:os';
9+
import childProcess from 'node:child_process';
10+
import _crypto from 'node:crypto';
11+
import os from 'node:os';
1212
import { AnyJson } from '@salesforce/ts-types';
1313
import { assert, expect } from 'chai';
1414
import { Crypto } from '../../../src/crypto/crypto';

test/unit/crypto/cryptoTest.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
*/
77
/* eslint-disable @typescript-eslint/ban-types */
88

9-
import * as os from 'node:os';
9+
import os from 'node:os';
1010
import { stubMethod } from '@salesforce/ts-sinon';
1111
import { expect } from 'chai';
1212
import { Crypto } from '../../../src/crypto/crypto';

test/unit/crypto/keyChainImplTest.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
/* eslint-disable no-underscore-dangle */
1212
/* eslint-disable @typescript-eslint/no-unsafe-assignment */
1313

14-
import * as fs from 'node:fs';
14+
import fs from 'node:fs';
1515
import { assert, expect } from 'chai';
1616
import { KeychainAccess, keyChainImpl } from '../../../src/crypto/keyChainImpl';
1717
import { shouldThrow, TestContext } from '../../../src/testSetup';

test/unit/crypto/secureStringTest.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* Licensed under the BSD 3-Clause license.
55
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
66
*/
7-
import * as crypto from 'node:crypto';
7+
import crypto from 'node:crypto';
88
import { expect } from 'chai';
99
import { stub } from 'sinon';
1010
import { SecureBuffer } from '../../../src/crypto/secureBuffer';

test/unit/messagesTest.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
/* eslint-disable @typescript-eslint/no-unsafe-argument */
88
/* eslint-disable @typescript-eslint/no-unsafe-member-access */
99

10-
import * as fs from 'node:fs';
11-
import * as path from 'node:path';
10+
import fs from 'node:fs';
11+
import path from 'node:path';
1212
import { EOL } from 'node:os';
1313
import { assert, expect } from 'chai';
1414
import { SinonStub } from 'sinon';

test/unit/org/authInfoTest.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@
99
/* eslint-disable @typescript-eslint/ban-types */
1010
/* eslint-disable @typescript-eslint/no-unsafe-member-access */
1111

12-
import * as pathImport from 'node:path';
13-
import * as dns from 'node:dns';
14-
import * as jwt from 'jsonwebtoken';
12+
import pathImport from 'node:path';
13+
import dns from 'node:dns';
14+
import jwt from 'jsonwebtoken';
1515
import { env, includes } from '@salesforce/kit';
1616
import { spyMethod, stubMethod } from '@salesforce/ts-sinon';
1717
import { AnyJson, getJsonMap, JsonMap, toJsonMap } from '@salesforce/ts-types';

test/unit/org/orgTest.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
66
*/
77
import { deepStrictEqual, fail } from 'node:assert';
8-
import * as fs from 'node:fs';
8+
import fs from 'node:fs';
99
import { constants as fsConstants } from 'node:fs';
1010
import { join as pathJoin } from 'node:path';
1111
import { format } from 'node:util';

test/unit/status/myDomainResolverTest.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* Licensed under the BSD 3-Clause license.
55
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
66
*/
7-
import * as dns from 'node:dns';
7+
import dns from 'node:dns';
88
import { URL } from 'node:url';
99
import { Duration, Env } from '@salesforce/kit';
1010
import { AnyFunction } from '@salesforce/ts-types';

test/unit/util/directoryWriterTest.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import * as fs from 'node:fs';
99
import * as path from 'node:path';
1010
import { Readable } from 'node:stream';
1111
import * as chai from 'chai';
12-
import * as chaiString from 'chai-string';
12+
import chaiString from 'chai-string';
1313
import { DirectoryWriter } from '../../../src/util/directoryWriter';
1414

1515
// eslint-disable-next-line @typescript-eslint/no-var-requires

test/unit/util/zipWriterTest.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import * as fs from 'node:fs';
99
import * as path from 'node:path';
1010
import { expect } from 'chai';
1111
import * as sinon from 'sinon';
12-
import * as JSZip from 'jszip';
12+
import JSZip from 'jszip';
1313
import { ZipWriter } from '../../../src/util/zipWriter';
1414

1515
describe('ZipWriter', () => {

tsconfig.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
"outDir": "./lib",
55
"resolveJsonModule": true,
66
"rootDir": "./src",
7-
"plugins": [{ "transform": "./src/messageTransformer.ts" }]
7+
"plugins": [{ "transform": "./src/messageTransformer.ts" }],
8+
"esModuleInterop": true
89
},
910
"include": ["./src/**/*.ts"]
1011
}

typedocExamples/tsconfig.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
"compilerOptions": {
55
"noEmit": true,
66
"skipLibCheck": true,
7-
"resolveJsonModule": true
7+
"resolveJsonModule": true,
8+
"esModuleInterop": true
89
}
910
}

0 commit comments

Comments
 (0)