Skip to content

Commit

Permalink
Merge pull request #2217 from zowe/fix-deprecation-master
Browse files Browse the repository at this point in the history
Use Fewer Deprecated Functions in Master
  • Loading branch information
awharn authored Aug 8, 2024
2 parents 5883be1 + bd6d84c commit de6aacc
Show file tree
Hide file tree
Showing 145 changed files with 979 additions and 359 deletions.
6 changes: 4 additions & 2 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ module.exports = {
},
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended"
"plugin:@typescript-eslint/recommended",
"plugin:deprecation/recommended"
],
"ignorePatterns": [
"**/*.js",
Expand Down Expand Up @@ -37,7 +38,8 @@ module.exports = {
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": 12,
"sourceType": "module"
"sourceType": "module",
"project": ["./tsconfig.json", "./__tests__/tsconfig.json"]
},
"plugins": [
"@typescript-eslint",
Expand Down
7 changes: 7 additions & 0 deletions .madgerc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"detectiveOptions": {
"ts": {
"skipTypeImports": true
}
}
}
4 changes: 4 additions & 0 deletions __tests__/__packages__/cli-test-utils/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

All notable changes to the Zowe CLI test utils package will be documented in this file.

## Recent Changes

- BugFix: Refactored code to reduce the use of deprecated functions to prepare for upcoming Node.js 22 support. [#2191](https://github.com/zowe/zowe-cli/issues/2191)

## `7.28.2`

- BugFix: Improved the error message shown on Windows when `runCliScript` method cannot find `sh` executable on PATH. [#2208](https://github.com/zowe/zowe-cli/issues/2208)
Expand Down
1 change: 1 addition & 0 deletions __tests__/__packages__/cli-test-utils/src/TestUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,7 @@ export function mockHandlerParameters(params: PartialHandlerParameters): IHandle
...(params.arguments || {})
},
positionals: params.positionals || [],
// eslint-disable-next-line deprecation/deprecation
profiles: params.profiles || new CommandProfiles(new Map()),
definition: params.definition,
fullDefinition: params.definition,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,7 @@ export class TempTestProfiles {
config.api.layers.activate(false, true);

// Remove profile from config JSON
// eslint-disable-next-line deprecation/deprecation
config.delete(config.api.profiles.expandPath(profileName));
if (config.api.layers.get().properties.defaults[profileType] === profileName) {
config.delete(`defaults.${profileType}`);
Expand Down
5 changes: 3 additions & 2 deletions __tests__/test-tsconfig.json → __tests__/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@
"newLine": "lf"
},
"include": [
"./**/*.ts",
"../packages/**/__tests__/**/*.ts"
"**/*.test.ts",
"**/*.subtest.ts",
"**/__tests__/**/*"
],
"files": [
"../__types__/wontache.d.ts"
Expand Down
Loading

0 comments on commit de6aacc

Please sign in to comment.