Skip to content

Commit ed3569c

Browse files
authored
feat!: core7, node17 modules (#363)
BREAKING CHANGE: core imports from top-level, core7
1 parent 8671dcd commit ed3569c

7 files changed

+60
-258
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
"!lib/**/*.map"
4141
],
4242
"dependencies": {
43-
"@salesforce/core": "^6.7.6",
43+
"@salesforce/core": "^7.0.0",
4444
"@salesforce/kit": "^3.1.0",
4545
"applicationinsights": "^2.9.5",
4646
"got": "^11",

src/appInsights.ts

+2-2
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 * as os from 'node:os';
8-
import { Logger } from '@salesforce/core';
8+
import { Logger } from '@salesforce/core/logger';
99
import { AsyncCreatable, Env } from '@salesforce/kit';
1010
import * as appInsights from 'applicationinsights';
1111

@@ -33,7 +33,7 @@ export type TelemetryOptions = {
3333
userId?: string;
3434
sessionId?: string;
3535
waitForConnection?: boolean;
36-
}
36+
};
3737

3838
export function getPlatformVersion(): string {
3939
return (os.release() || '').replace(/^(\d+)(\.\d+)?(\.\d+)?(.*)/, '$1$2$3');

src/enabledCheck.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
*/
77

88
// deep imports to avoid requiring the ENTIRE package (which will also pull in jsforce) until we get ESM done
9-
import { ConfigAggregator } from '@salesforce/core/lib/config/configAggregator';
10-
import { SfConfigProperties } from '@salesforce/core/lib/config/config';
9+
import { ConfigAggregator } from '@salesforce/core/configAggregator';
10+
import { SfConfigProperties } from '@salesforce/core/config';
1111

1212
// store the result to reduce checks
1313
let enabled: boolean | undefined;

src/telemetryReporter.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import { AsyncCreatable, env } from '@salesforce/kit';
1111
import got from 'got';
1212
import { ProxyAgent } from 'proxy-agent';
1313
import { AppInsights, type Attributes, type Properties, type TelemetryOptions } from './appInsights';
14-
import { TelemetryClient } from './exported';
14+
import { TelemetryClient } from './appInsights';
1515
import { isEnabled } from './enabledCheck';
1616

1717
export { TelemetryOptions, Attributes, Properties, TelemetryClient } from './appInsights';

test/tsconfig.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
"include": ["unit/**/*.ts", "../node_modules/@types/**/*.d.ts"],
44
"compilerOptions": {
55
"noEmit": true,
6-
"skipLibCheck": true
6+
"skipLibCheck": true,
7+
"moduleResolution": "Node16",
8+
"module": "Node16"
79
}
810
}

tsconfig.json

+2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
"extends": "@salesforce/dev-config/tsconfig-strict",
33
"compilerOptions": {
44
"esModuleInterop": true,
5+
"moduleResolution": "Node16",
6+
"module": "Node16",
57
"outDir": "./lib",
68
"rootDir": "src",
79
"baseUrl": "."

0 commit comments

Comments
 (0)