Skip to content

Commit 7e16b50

Browse files
authored
Merge pull request #545 from github0null/dev
v3.27.2 revision
2 parents f5a6a7a + 72dc06e commit 7e16b50

7 files changed

Lines changed: 18 additions & 16 deletions

File tree

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,13 @@ All notable version changes will be recorded in this file.
66

77
***
88

9+
### [v3.27.2] revision
10+
11+
**Fix**:
12+
- `Runtime compatibility`: Fixed NodeJS API deprecations (`DEP0051` and `DEP0044`). [Issue 542 543 544](https://github.com/github0null/eide/issues/542)
13+
14+
***
15+
916
### [v3.27.0] update
1017

1118
**New**:

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
"homepage": "https://em-ide.com",
3737
"license": "MIT",
3838
"description": "A mcu development environment for 8051/AVR/STM8/Cortex-M/MIPS/RISC-V",
39-
"version": "3.27.0",
39+
"version": "3.27.2",
4040
"preview": false,
4141
"engines": {
4242
"vscode": "^1.89.0"

src/EIDEProjectExplorer.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,6 @@ import {
131131
SourceFileConfigurationItem, WorkspaceBrowseConfiguration
132132
} from 'vscode-cpptools';
133133
import * as eclipseParser from './EclipseProjectParser';
134-
import { isArray } from 'util';
135134
import {
136135
parseIarCompilerLog,
137136
CompilerDiagnostics, parseGccCompilerLog, parseArmccCompilerLog,
@@ -2160,7 +2159,7 @@ class ProjectDataProvider implements vscode.TreeDataProvider<ProjTreeItem>, vsco
21602159
// copy string options
21612160

21622161
const optToString = (obj: string | string[]): string => {
2163-
if (isArray(obj)) {
2162+
if (Array.isArray(obj)) {
21642163
return obj[0];
21652164
} else {
21662165
return obj;

src/EIDEProjectModules.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import * as fs from 'fs';
55
import * as vscode from 'vscode';
66
import * as NodePath from 'path';
77
import { jsonc } from 'jsonc';
8-
import { isNullOrUndefined } from "util";
98
import * as child_process from 'child_process';
109

1110
import { File } from "../lib/node-utility/File";
@@ -379,7 +378,7 @@ export abstract class ConfigModel<DataType> {
379378

380379
// set default value
381380
for (const key in _default) {
382-
if (!isNullOrUndefined(_default[key])) {
381+
if (_default[key] !== undefined && _default[key] !== null) {
383382
if (typeof (<any>newConfig)[key] !== typeof _default[key]) {
384383
(<any>newConfig)[key] = _default[key];
385384
}

src/EclipseProjectParser.ts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import * as os from 'os';
44
import * as xml2js from 'xml2js';
55
import { VirtualFolder } from './EIDETypeDefine';
66
import { VirtualSource, AbstractProject } from './EIDEProject';
7-
import { isArray } from 'util';
87
import { ArrayDelRepetition } from '../lib/node-utility/Utility';
98
import { File } from '../lib/node-utility/File';
109
import { GlobalEvent } from './GlobalEvents';
@@ -483,7 +482,7 @@ export async function parseEclipseProject(cprojectPath: string): Promise<Eclipse
483482

484483
for (const key in target.builldArgs) {
485484
const obj: any = target.builldArgs;
486-
if (isArray(obj[key])) {
485+
if (Array.isArray(obj[key])) {
487486
obj[key] = ArrayDelRepetition(obj[key]);
488487
}
489488
}
@@ -508,10 +507,10 @@ function parseToolOption(optionObj: any, prjtype: EclipseProjectType): { type: s
508507

509508
const makeResult = (value: string | string[], typ?: string): { type: string, val: string[] } | undefined => {
510509
if (value == '') return undefined;
511-
if (isArray(value) && value.length == 0) return undefined;
510+
if (Array.isArray(value) && value.length == 0) return undefined;
512511
return {
513512
type: typ || VALUE_TYPE || '',
514-
val: isArray(value) ? value : [value]
513+
val: Array.isArray(value) ? value : [value]
515514
};
516515
};
517516

@@ -792,7 +791,7 @@ function parseToolOption(optionObj: any, prjtype: EclipseProjectType): { type: s
792791

793792
function toArray(obj: any): any[] {
794793
if (obj == undefined || obj == null) return [];
795-
if (!isArray(obj)) return [obj];
794+
if (!Array.isArray(obj)) return [obj];
796795
return obj;
797796
}
798797

src/IarProjectParser.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import * as xml2js from 'xml2js';
55
import * as ini from 'ini';
66
import { VirtualFolder } from './EIDETypeDefine';
77
import { VirtualSource, AbstractProject } from './EIDEProject';
8-
import { isArray } from 'util';
98
import { ArrayDelRepetition } from '../lib/node-utility/Utility';
109
import { File } from '../lib/node-utility/File';
1110
import { GlobalEvent } from './GlobalEvents';
@@ -223,11 +222,11 @@ function parseTarget(proj: IarProjectInfo, configNodes: any) {
223222
});
224223
// builder action
225224
if (settingName == 'BUILDACTION') {
226-
if (isArray(dataNode.prebuild)) {
225+
if (Array.isArray(dataNode.prebuild)) {
227226
nTarget.builderActions.prebuild =
228227
formatEnvNameAndPathSep(dataNode.prebuild[0], true);
229228
}
230-
if (isArray(dataNode.postbuild)) {
229+
if (Array.isArray(dataNode.postbuild)) {
231230
nTarget.builderActions.postbuild =
232231
formatEnvNameAndPathSep(dataNode.postbuild[0], true);
233232
}
@@ -314,7 +313,7 @@ function isValidEnvName(name: string): boolean {
314313

315314
function toArray(obj: any): any[] {
316315
if (obj == undefined || obj == null) return [];
317-
if (isArray(obj)) return obj;
316+
if (Array.isArray(obj)) return obj;
318317
return [obj];
319318
}
320319

src/utility.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ import { GitFileInfo } from './WebInterface/GithubInterface';
3838
import * as platform from './Platform';
3939
import { SevenZipper } from './Compress';
4040
import { ResManager } from './ResManager';
41-
import { isArray } from 'util';
4241
import { ExeCmd } from '../lib/node-utility/Executable';
4342
import { GlobalEvent } from './GlobalEvents';
4443
import { SettingManager } from './SettingManager';
@@ -669,7 +668,7 @@ export function newFileTooltipString(f: File | FileTooltipInfo, root?: File): vs
669668

670669
export function toArray(obj: any): any[] {
671670
if (obj == undefined || obj == null) return [];
672-
if (isArray(obj)) return obj;
671+
if (Array.isArray(obj)) return obj;
673672
return [obj];
674673
}
675674

0 commit comments

Comments
 (0)