Skip to content

Commit fb51918

Browse files
authored
CHANGE @W-19688830@ Updated node dependencies (#374)
1 parent bdbd7ae commit fb51918

File tree

16 files changed

+1203
-713
lines changed

16 files changed

+1203
-713
lines changed

package-lock.json

Lines changed: 1048 additions & 590 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/ENGINE-TEMPLATE/package.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,17 @@
1414
"types": "dist/index.d.ts",
1515
"dependencies": {
1616
"@types/node": "^20.0.0",
17-
"@salesforce/code-analyzer-engine-api": "0.30.0"
17+
"@salesforce/code-analyzer-engine-api": "0.31.0-SNAPSHOT"
1818
},
1919
"devDependencies": {
20-
"@eslint/js": "^9.35.0",
20+
"@eslint/js": "^9.38.0",
2121
"@types/jest": "^30.0.0",
22-
"eslint": "^9.35.0",
23-
"jest": "^30.1.3",
22+
"eslint": "^9.38.0",
23+
"jest": "^30.2.0",
2424
"rimraf": "^6.0.1",
25-
"ts-jest": "^29.4.2",
26-
"typescript": "^5.9.2",
27-
"typescript-eslint": "^8.44.0"
25+
"ts-jest": "^29.4.5",
26+
"typescript": "^5.9.3",
27+
"typescript-eslint": "^8.46.2"
2828
},
2929
"engines": {
3030
"node": ">=20.0.0"
@@ -60,4 +60,4 @@
6060
"!src/index.ts"
6161
]
6262
}
63-
}
63+
}

packages/code-analyzer-core/package.json

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,26 +16,26 @@
1616
},
1717
"types": "dist/index.d.ts",
1818
"dependencies": {
19-
"@salesforce/code-analyzer-engine-api": "0.30.0",
19+
"@salesforce/code-analyzer-engine-api": "0.31.0-SNAPSHOT",
2020
"@types/node": "^20.0.0",
2121
"csv-stringify": "^6.6.0",
2222
"js-yaml": "^4.1.0",
23-
"semver": "^7.7.2",
23+
"semver": "^7.7.3",
2424
"xmlbuilder": "^15.1.1"
2525
},
2626
"devDependencies": {
27-
"@eslint/js": "^9.35.0",
27+
"@eslint/js": "^9.38.0",
2828
"@types/js-yaml": "^4.0.9",
2929
"@types/jest": "^30.0.0",
3030
"@types/sarif": "^2.1.7",
3131
"@types/semver": "^7.7.1",
32-
"cross-env": "^10.0.0",
33-
"eslint": "^9.35.0",
34-
"jest": "^30.1.3",
32+
"cross-env": "^10.1.0",
33+
"eslint": "^9.38.0",
34+
"jest": "^30.2.0",
3535
"rimraf": "^6.0.1",
36-
"ts-jest": "^29.4.2",
37-
"typescript": "^5.9.2",
38-
"typescript-eslint": "^8.44.0"
36+
"ts-jest": "^29.4.5",
37+
"typescript": "^5.9.3",
38+
"typescript-eslint": "^8.46.2"
3939
},
4040
"engines": {
4141
"node": ">=20.0.0"

packages/code-analyzer-engine-api/package.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@salesforce/code-analyzer-engine-api",
33
"description": "Engine API Package for the Salesforce Code Analyzer",
4-
"version": "0.30.0",
4+
"version": "0.31.0-SNAPSHOT",
55
"author": "The Salesforce Code Analyzer Team",
66
"license": "BSD-3-Clause",
77
"homepage": "https://developer.salesforce.com/docs/platform/salesforce-code-analyzer/overview",
@@ -19,14 +19,14 @@
1919
"@types/node": "^20.0.0"
2020
},
2121
"devDependencies": {
22-
"@eslint/js": "^9.35.0",
22+
"@eslint/js": "^9.38.0",
2323
"@types/jest": "^30.0.0",
24-
"eslint": "^9.35.0",
25-
"jest": "^30.1.3",
24+
"eslint": "^9.38.0",
25+
"jest": "^30.2.0",
2626
"rimraf": "^6.0.1",
27-
"ts-jest": "^29.4.2",
28-
"typescript": "^5.9.2",
29-
"typescript-eslint": "^8.44.0"
27+
"ts-jest": "^29.4.5",
28+
"typescript": "^5.9.3",
29+
"typescript-eslint": "^8.46.2"
3030
},
3131
"engines": {
3232
"node": ">=20.0.0"
@@ -63,4 +63,4 @@
6363
"!src/utils/index.ts"
6464
]
6565
}
66-
}
66+
}

packages/code-analyzer-eslint-engine/package.json

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@salesforce/code-analyzer-eslint-engine",
33
"description": "Plugin package that adds 'eslint' as an engine into Salesforce Code Analyzer",
4-
"version": "0.35.0",
4+
"version": "0.36.0-SNAPSHOT",
55
"author": "The Salesforce Code Analyzer Team",
66
"license": "BSD-3-Clause",
77
"homepage": "https://developer.salesforce.com/docs/platform/salesforce-code-analyzer/overview",
@@ -13,33 +13,33 @@
1313
"main": "dist/index.js",
1414
"types": "dist/index.d.ts",
1515
"dependencies": {
16-
"@eslint/js": "^9.35.0",
16+
"@eslint/js": "^9.38.0",
1717
"@lwc/eslint-plugin-lwc": "^3.2.0",
18-
"@lwc/eslint-plugin-lwc-platform": "^6.1.0",
18+
"@lwc/eslint-plugin-lwc-platform": "^6.3.0",
1919
"@salesforce-ux/eslint-plugin-slds": "^1.0.2",
20-
"@salesforce/code-analyzer-engine-api": "0.30.0",
21-
"@salesforce/code-analyzer-eslint8-engine": "0.7.0",
20+
"@salesforce/code-analyzer-engine-api": "0.31.0-SNAPSHOT",
21+
"@salesforce/code-analyzer-eslint8-engine": "0.8.0-SNAPSHOT",
2222
"@salesforce/eslint-config-lwc": "^4.0.0",
2323
"@salesforce/eslint-plugin-lightning": "^2.0.0",
2424
"@types/node": "^20.0.0",
2525
"@typescript-eslint/eslint-plugin": "^8.44.0",
2626
"@typescript-eslint/parser": "^8.44.0",
27-
"eslint": "^9.35.0",
27+
"eslint": "^9.38.0",
2828
"eslint-plugin-import": "^2.32.0",
2929
"eslint-plugin-jest": "^29.0.1",
3030
"globals": "^16.4.0",
31-
"semver": "^7.7.2",
32-
"typescript": "^5.9.2",
33-
"typescript-eslint": "^8.44.0"
31+
"semver": "^7.7.3",
32+
"typescript": "^5.9.3",
33+
"typescript-eslint": "^8.46.2"
3434
},
3535
"devDependencies": {
3636
"@types/jest": "^30.0.0",
3737
"@types/semver": "^7.7.1",
3838
"@types/unzipper": "^0.10.11",
39-
"cross-env": "^10.0.0",
40-
"jest": "^30.1.3",
39+
"cross-env": "^10.1.0",
40+
"jest": "^30.2.0",
4141
"rimraf": "^6.0.1",
42-
"ts-jest": "^29.4.2",
42+
"ts-jest": "^29.4.5",
4343
"unzipper": "^0.12.3"
4444
},
4545
"engines": {
@@ -76,4 +76,4 @@
7676
"!src/index.ts"
7777
]
7878
}
79-
}
79+
}

packages/code-analyzer-eslint-engine/src/base-config.ts

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@ import globals from "globals";
99

1010
export class BaseConfigFactory {
1111
private readonly engineConfig: ESLintEngineConfig;
12-
12+
1313
constructor(engineConfig: ESLintEngineConfig) {
1414
this.engineConfig = engineConfig;
1515
}
16-
16+
1717
createBaseConfigArray(): Linter.Config[] {
1818
const configArray: Linter.Config[] = [{
1919
linterOptions: {
@@ -28,7 +28,7 @@ export class BaseConfigFactory {
2828
"$Label": "readonly", // ^
2929
"$Locale": "readonly", // ^
3030
"$Resource": "readonly", // ^
31-
31+
3232
// ESLint doesn't natively know about various browser and node globals. So we add them here to
3333
// remove false positives for our users.
3434
... globals.node,
@@ -37,7 +37,7 @@ export class BaseConfigFactory {
3737
}
3838
}
3939
}];
40-
40+
4141
if (this.useJsBaseConfig() && this.useLwcBaseConfig()) {
4242
configArray.push(...this.createJavascriptPlusLwcConfigArray());
4343
} else if (this.useJsBaseConfig()) {
@@ -56,22 +56,22 @@ export class BaseConfigFactory {
5656
}
5757
return configArray;
5858
}
59-
59+
6060
private createJavascriptPlusLwcConfigArray(): Linter.Config[] {
6161
let configs: Linter.Config[] = validateAndGetRawLwcConfigArray();
62-
62+
6363
// TODO: Remove the For the following 2 updates when https://github.com/salesforce/eslint-config-lwc/issues/158 is fixed
6464
// 1) Turn off the babel parser's configFile option from the lwc base plugin
65-
configs[0].languageOptions!.parserOptions!.babelOptions.configFile = false;
65+
(configs[0].languageOptions!.parserOptions as Linter.ParserOptions).babelOptions.configFile = false;
6666
// 2) For some reason babel doesn't like .cjs files unless we explicitly set this to undefined because I think
6767
// ESLint 9 is setting it to "commonjs" automatically when the field doesn't exist in the parserOptions (and for
6868
// babel "commonjs" isn't a valid option)
69-
configs[0].languageOptions!.parserOptions!.sourceType = undefined;
70-
69+
(configs[0].languageOptions!.parserOptions as Linter.ParserOptions).sourceType = undefined;
70+
7171
// Swap out eslintJs.configs.recommended with eslintJs.configs.all
7272
configs[1] = eslintJs.configs.all;
73-
74-
// This one rule makes eslint throw an exception if the user doesn't have jest installed (which should be
73+
74+
// This one rule makes eslint throw an exception if the user doesn't have jest installed (which should be
7575
// optional), so we turn it off for now. See https://github.com/salesforce/eslint-config-lwc/issues/161
7676
configs[3].rules = {
7777
...configs[3].rules,
@@ -84,41 +84,41 @@ export class BaseConfigFactory {
8484
...configs[5].rules,
8585
'@lwc/lwc-platform/valid-offline-wire': 'off'
8686
}
87-
87+
8888
// Restrict these configs to just javascript files
8989
configs = configs.map(config => {
9090
return {
9191
...config,
9292
files: this.engineConfig.file_extensions.javascript.map(ext => `**/*${ext}`)
9393
}
9494
});
95-
95+
9696
return configs;
9797
}
98-
98+
9999
private createLwcConfigArray(): Linter.Config[] {
100100
const configs: Linter.Config[] = this.createJavascriptPlusLwcConfigArray();
101-
101+
102102
// Remove any explicitly listed rule that is a base javascript rule from the recommended LWC/Lightning rules.
103103
// Note the modified base rules don't have namespace like jest/*, @lwc/*, etc (and thus has no '/').
104104
configs[4].rules = Object.fromEntries(
105105
Object.entries(configs[4].rules as Linter.RulesRecord).filter(([key]) => key.includes('/'))
106106
);
107-
107+
108108
// Remove the eslintJs.configs.all (at element 1). Note that this delete is after the configs[4] update above so
109109
// we can work with the original index [4] instead of [3] to avoid confusion.
110110
configs.splice(1, 1);
111-
111+
112112
return configs;
113113
}
114-
114+
115115
private createJavascriptConfigArray(): Linter.Config[] {
116116
return [{
117117
... eslintJs.configs.all,
118118
files: this.engineConfig.file_extensions.javascript.map(ext => `**/*${ext}`)
119119
}];
120120
}
121-
121+
122122
private createSldsHTMLConfigArray(): Linter.Config[] {
123123
return sldsEslintPlugin.configs['flat/recommended-html'].map((htmlConfig: Linter.Config) => {
124124
return {
@@ -127,16 +127,16 @@ export class BaseConfigFactory {
127127
};
128128
});
129129
}
130-
131-
private createSldsCSSConfigArray(): Linter.Config[] {
130+
131+
private createSldsCSSConfigArray(): Linter.Config[] {
132132
return sldsEslintPlugin.configs['flat/recommended-css'].map((cssConfig: Linter.Config) => {
133133
return {
134134
...cssConfig,
135135
files: this.engineConfig.file_extensions.css.map(ext => `**/*${ext}`)
136136
};
137137
});
138138
}
139-
139+
140140
private createTypescriptConfigArray(): Linter.Config[] {
141141
const configs: Linter.Config[] = [];
142142
for (const conf of ([eslintJs.configs.all, ...eslintTs.configs.all] as Linter.Config[])) {
@@ -147,7 +147,7 @@ export class BaseConfigFactory {
147147
... (conf.languageOptions ?? {}),
148148
parserOptions: {
149149
... (conf.languageOptions?.parserOptions ?? {}),
150-
150+
151151
// Finds the tsconfig.json file nearest to each source file. This should work for most users.
152152
// If not, then we may consider letting user specify this via config or alternatively users can
153153
// just set disable_typescript_base_config=true and configure typescript in their own eslint
@@ -159,23 +159,23 @@ export class BaseConfigFactory {
159159
}
160160
return configs;
161161
}
162-
162+
163163
private useJsBaseConfig(): boolean {
164164
return !this.engineConfig.disable_javascript_base_config && this.engineConfig.file_extensions.javascript.length > 0;
165165
}
166-
166+
167167
private useLwcBaseConfig(): boolean {
168168
return !this.engineConfig.disable_lwc_base_config && this.engineConfig.file_extensions.javascript.length > 0;
169169
}
170-
170+
171171
private useSldsCSSBaseConfig(): boolean {
172172
return !this.engineConfig.disable_slds_base_config && this.engineConfig.file_extensions.css.length > 0;
173173
}
174-
174+
175175
private useSldsHTMLBaseConfig(): boolean {
176176
return !this.engineConfig.disable_slds_base_config && this.engineConfig.file_extensions.html.length > 0;
177177
}
178-
178+
179179
private useTsBaseConfig(): boolean {
180180
return !this.engineConfig.disable_typescript_base_config && this.engineConfig.file_extensions.typescript.length > 0;
181181
}
@@ -206,13 +206,13 @@ function validateAndGetRawLwcConfigArray(): Linter.Config[] {
206206
// - and lib/configs/recommended.js of https://www.npmjs.com/package/@lwc/eslint-plugin-lwc-platform?activeTab=code
207207
throw new Error("INTERNAL ERROR: The recommended config for @salesforce/eslint-config-lwc or @lwc/eslint-plugin-lwc-platform must have changed.");
208208
}
209-
209+
210210
// Return a shallow copy since we will be making modifications
211211
return rawLwcConfigs.map(config => { return {... config}});
212212
}
213213

214214
function containsBabelOptions(config: Linter.Config): boolean {
215-
return config.languageOptions?.parserOptions?.babelOptions !== undefined;
215+
return (config.languageOptions?.parserOptions as Linter.ParserOptions)?.babelOptions !== undefined;
216216
}
217217

218218
function hasRule(config: Linter.Config, ruleName: string): boolean {

packages/code-analyzer-eslint-engine/src/rule-mappings.ts

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -863,6 +863,10 @@ export const RULE_MAPPINGS: Record<string, {severity: SeverityLevel, tags: strin
863863
severity: SeverityLevel.Moderate,
864864
tags: [COMMON_TAGS.RECOMMENDED, LWC, COMMON_TAGS.CATEGORIES.BEST_PRACTICES, COMMON_TAGS.LANGUAGES.JAVASCRIPT]
865865
},
866+
"@lwc/lwc-platform/no-interop-execute-controller-with-client-def": {
867+
severity: SeverityLevel.Moderate,
868+
tags: [COMMON_TAGS.RECOMMENDED, LWC, COMMON_TAGS.CATEGORIES.BEST_PRACTICES, COMMON_TAGS.LANGUAGES.JAVASCRIPT]
869+
},
866870
"@lwc/lwc-platform/no-interop-execute-with-callback": {
867871
severity: SeverityLevel.Moderate,
868872
tags: [COMMON_TAGS.RECOMMENDED, LWC, COMMON_TAGS.CATEGORIES.BEST_PRACTICES, COMMON_TAGS.LANGUAGES.JAVASCRIPT]
@@ -911,6 +915,10 @@ export const RULE_MAPPINGS: Record<string, {severity: SeverityLevel, tags: strin
911915
severity: SeverityLevel.Moderate,
912916
tags: [COMMON_TAGS.RECOMMENDED, LWC, COMMON_TAGS.CATEGORIES.BEST_PRACTICES, COMMON_TAGS.LANGUAGES.JAVASCRIPT]
913917
},
918+
"@lwc/lwc-platform/no-lds-aura-controller-method": {
919+
severity: SeverityLevel.Moderate,
920+
tags: [COMMON_TAGS.RECOMMENDED, LWC, COMMON_TAGS.CATEGORIES.BEST_PRACTICES, COMMON_TAGS.LANGUAGES.JAVASCRIPT]
921+
},
914922
"@lwc/lwc-platform/no-process-env": {
915923
severity: SeverityLevel.Moderate,
916924
tags: [COMMON_TAGS.RECOMMENDED, LWC, COMMON_TAGS.CATEGORIES.BEST_PRACTICES, COMMON_TAGS.LANGUAGES.JAVASCRIPT]
@@ -1041,7 +1049,7 @@ export const RULE_MAPPINGS: Record<string, {severity: SeverityLevel, tags: strin
10411049
tags: [COMMON_TAGS.RECOMMENDED, LWC, COMMON_TAGS.CATEGORIES.ERROR_PRONE, COMMON_TAGS.LANGUAGES.JAVASCRIPT]
10421050
},
10431051

1044-
// This one rule makes eslint throw an exception if the user doesn't have jest installed (which should be
1052+
// This one rule makes eslint throw an exception if the user doesn't have jest installed (which should be
10451053
// optional), so we turn it off for now. See https://github.com/salesforce/eslint-config-lwc/issues/161
10461054
// "jest/no-deprecated-functions": {
10471055
// severity: SeverityLevel.Moderate,
@@ -1604,7 +1612,7 @@ export const RULE_MAPPINGS: Record<string, {severity: SeverityLevel, tags: strin
16041612
severity: SeverityLevel.Moderate,
16051613
tags: [/* NOT RECOMMENDED */ COMMON_TAGS.CATEGORIES.BEST_PRACTICES, COMMON_TAGS.LANGUAGES.TYPESCRIPT]
16061614
},
1607-
1615+
16081616
// =================================================================================================================
16091617
// SLDS - HTML BASE RULES - @salesforce-ux/eslint-plugin-slds
16101618
// =================================================================================================================

0 commit comments

Comments
 (0)