Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat!: core7, node17 modules #363

Merged
merged 1 commit into from
Apr 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"!lib/**/*.map"
],
"dependencies": {
"@salesforce/core": "^6.7.6",
"@salesforce/core": "^7.0.0",
"@salesforce/kit": "^3.1.0",
"applicationinsights": "^2.9.5",
"got": "^11",
Expand Down
4 changes: 2 additions & 2 deletions src/appInsights.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
*/
import * as os from 'node:os';
import { Logger } from '@salesforce/core';
import { Logger } from '@salesforce/core/logger';
import { AsyncCreatable, Env } from '@salesforce/kit';
import * as appInsights from 'applicationinsights';

Expand Down Expand Up @@ -33,7 +33,7 @@ export type TelemetryOptions = {
userId?: string;
sessionId?: string;
waitForConnection?: boolean;
}
};

export function getPlatformVersion(): string {
return (os.release() || '').replace(/^(\d+)(\.\d+)?(\.\d+)?(.*)/, '$1$2$3');
Expand Down
4 changes: 2 additions & 2 deletions src/enabledCheck.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
*/

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

// store the result to reduce checks
let enabled: boolean | undefined;
Expand Down
2 changes: 1 addition & 1 deletion src/telemetryReporter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { AsyncCreatable, env } from '@salesforce/kit';
import got from 'got';
import { ProxyAgent } from 'proxy-agent';
import { AppInsights, type Attributes, type Properties, type TelemetryOptions } from './appInsights';
import { TelemetryClient } from './exported';
import { TelemetryClient } from './appInsights';
import { isEnabled } from './enabledCheck';

export { TelemetryOptions, Attributes, Properties, TelemetryClient } from './appInsights';
Expand Down
4 changes: 3 additions & 1 deletion test/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
"include": ["unit/**/*.ts", "../node_modules/@types/**/*.d.ts"],
"compilerOptions": {
"noEmit": true,
"skipLibCheck": true
"skipLibCheck": true,
"moduleResolution": "Node16",
"module": "Node16"
}
}
2 changes: 2 additions & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
"extends": "@salesforce/dev-config/tsconfig-strict",
"compilerOptions": {
"esModuleInterop": true,
"moduleResolution": "Node16",
"module": "Node16",
"outDir": "./lib",
"rootDir": "src",
"baseUrl": "."
Expand Down
Loading
Loading