Skip to content

Commit

Permalink
fix(ignore): import using node: prefix for built-in (#1268)
Browse files Browse the repository at this point in the history
  • Loading branch information
Nerivec authored Dec 18, 2024
1 parent 6fde32f commit b23e10a
Show file tree
Hide file tree
Showing 59 changed files with 82 additions and 82 deletions.
2 changes: 1 addition & 1 deletion src/adapter/adapter.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import events from 'events';
import events from 'node:events';

import * as Models from '../models';
import {BroadcastAddress} from '../zspec/enums';
Expand Down
4 changes: 2 additions & 2 deletions src/adapter/adapterDiscovery.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import assert from 'assert';
import {platform} from 'os';
import assert from 'node:assert';
import {platform} from 'node:os';

import {PortInfo} from '@serialport/bindings-cpp';
import {Bonjour, Service} from 'bonjour-service';
Expand Down
4 changes: 2 additions & 2 deletions src/adapter/deconz/driver/driver.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* istanbul ignore file */

import events from 'events';
import net from 'net';
import events from 'node:events';
import net from 'node:net';

import slip from 'slip';

Expand Down
2 changes: 1 addition & 1 deletion src/adapter/deconz/driver/frameParser.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* istanbul ignore file */

import {EventEmitter} from 'stream';
import {EventEmitter} from 'node:events';

import {logger} from '../../../utils/logger';
import * as Zdo from '../../../zspec/zdo';
Expand Down
2 changes: 1 addition & 1 deletion src/adapter/deconz/driver/parser.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* istanbul ignore file */

import {Transform, TransformCallback} from 'stream';
import {Transform, TransformCallback} from 'node:stream';

import slip from 'slip';

Expand Down
2 changes: 1 addition & 1 deletion src/adapter/deconz/driver/writer.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* istanbul ignore file */

import * as stream from 'stream';
import * as stream from 'node:stream';

import slip from 'slip';

Expand Down
6 changes: 3 additions & 3 deletions src/adapter/ember/adapter/emberAdapter.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {randomBytes} from 'crypto';
import {existsSync, readFileSync, renameSync} from 'fs';
import path from 'path';
import {randomBytes} from 'node:crypto';
import {existsSync, readFileSync, renameSync} from 'node:fs';
import path from 'node:path';

import equals from 'fast-deep-equal/es6';

Expand Down
2 changes: 1 addition & 1 deletion src/adapter/ember/ezsp/ezsp.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* istanbul ignore file */

import EventEmitter from 'events';
import EventEmitter from 'node:events';

import {Queue} from '../../../utils';
import {logger} from '../../../utils/logger';
Expand Down
4 changes: 2 additions & 2 deletions src/adapter/ember/uart/ash.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* istanbul ignore file */

import {Socket} from 'net';
import {EventEmitter} from 'stream';
import {EventEmitter} from 'node:events';
import {Socket} from 'node:net';

import {wait} from '../../../utils';
import {logger} from '../../../utils/logger';
Expand Down
2 changes: 1 addition & 1 deletion src/adapter/ember/uart/parser.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* istanbul ignore file */

import {Transform, TransformCallback, TransformOptions} from 'stream';
import {Transform, TransformCallback, TransformOptions} from 'node:stream';

// import {logger} from '../../../utils/logger';
import {AshReservedByte} from './enums';
Expand Down
2 changes: 1 addition & 1 deletion src/adapter/ember/uart/writer.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* istanbul ignore file */

import {Readable, ReadableOptions} from 'stream';
import {Readable, ReadableOptions} from 'node:stream';

// import {logger} from '../../../utils/logger';

Expand Down
2 changes: 1 addition & 1 deletion src/adapter/ezsp/adapter/backup.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* istanbul ignore file */

import * as fs from 'fs';
import * as fs from 'node:fs';

import * as Models from '../../../models';
import {BackupUtils} from '../../../utils';
Expand Down
2 changes: 1 addition & 1 deletion src/adapter/ezsp/adapter/ezspAdapter.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* istanbul ignore file */

import assert from 'assert';
import assert from 'node:assert';

import * as Models from '../../../models';
import {Queue, wait, Waitress} from '../../../utils';
Expand Down
2 changes: 1 addition & 1 deletion src/adapter/ezsp/driver/driver.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* istanbul ignore file */

import {EventEmitter} from 'events';
import {EventEmitter} from 'node:events';

import equals from 'fast-deep-equal/es6';

Expand Down
2 changes: 1 addition & 1 deletion src/adapter/ezsp/driver/ezsp.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* istanbul ignore file */

import {EventEmitter} from 'events';
import {EventEmitter} from 'node:events';

import {Queue, wait, Waitress} from '../../../utils';
import {logger} from '../../../utils/logger';
Expand Down
2 changes: 1 addition & 1 deletion src/adapter/ezsp/driver/parser.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* istanbul ignore file */

import * as stream from 'stream';
import * as stream from 'node:stream';

import {logger} from '../../../utils/logger';
import * as consts from './consts';
Expand Down
4 changes: 2 additions & 2 deletions src/adapter/ezsp/driver/uart.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* istanbul ignore file */

import {EventEmitter} from 'events';
import net from 'net';
import {EventEmitter} from 'node:events';
import net from 'node:net';

import {Queue, wait, Waitress} from '../../../utils';
import {logger} from '../../../utils/logger';
Expand Down
2 changes: 1 addition & 1 deletion src/adapter/ezsp/driver/utils/crc16ccitt.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* istanbul ignore file */

import {Buffer} from 'buffer';
import {Buffer} from 'node:buffer';

type calcFn = (buf: Buffer | number[], previous: number) => number;

Expand Down
2 changes: 1 addition & 1 deletion src/adapter/ezsp/driver/utils/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* istanbul ignore file */

import {randomBytes} from 'crypto';
import {randomBytes} from 'node:crypto';

import {EmberEUI64, EmberInitialSecurityBitmask} from '../types/named';
import {EmberInitialSecurityState, EmberKeyData} from '../types/struct';
Expand Down
2 changes: 1 addition & 1 deletion src/adapter/ezsp/driver/writer.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* istanbul ignore file */

import * as stream from 'stream';
import * as stream from 'node:stream';

import {logger} from '../../../utils/logger';
import * as consts from './consts';
Expand Down
4 changes: 2 additions & 2 deletions src/adapter/z-stack/adapter/adapter-backup.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import assert from 'assert';
import * as fs from 'fs';
import assert from 'node:assert';
import * as fs from 'node:fs';

import * as Models from '../../../models';
import {BackupUtils} from '../../../utils';
Expand Down
2 changes: 1 addition & 1 deletion src/adapter/z-stack/adapter/adapter-nv-memory.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import assert from 'assert';
import assert from 'node:assert';

import {NvItemsIds, NvSystemIds, ZnpCommandStatus} from '../constants/common';
import * as Structs from '../structs';
Expand Down
2 changes: 1 addition & 1 deletion src/adapter/z-stack/adapter/manager.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as crypto from 'crypto';
import * as crypto from 'node:crypto';

import {TsType} from '../../';
import * as Models from '../../../models';
Expand Down
2 changes: 1 addition & 1 deletion src/adapter/z-stack/adapter/zStackAdapter.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import assert from 'assert';
import assert from 'node:assert';

import debounce from 'debounce';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import assert from 'assert';
import assert from 'node:assert';

import {StructMemoryAlignment} from '../struct';
import {Table} from '../table';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import assert from 'assert';
import assert from 'node:assert';

import {StructMemoryAlignment} from '../struct';
/* eslint-disable @typescript-eslint/explicit-function-return-type */
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import assert from 'assert';
import assert from 'node:assert';

import {StructMemoryAlignment} from '../struct';
/* eslint-disable @typescript-eslint/explicit-function-return-type */
Expand Down
2 changes: 1 addition & 1 deletion src/adapter/z-stack/structs/entries/has-configured.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* eslint-disable @typescript-eslint/explicit-function-return-type */

import assert from 'assert';
import assert from 'node:assert';

import {Struct} from '../struct';

Expand Down
2 changes: 1 addition & 1 deletion src/adapter/z-stack/structs/entries/nib.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* eslint-disable @typescript-eslint/explicit-function-return-type */

import assert from 'assert';
import assert from 'node:assert';

import {Struct} from '../struct';
import {nwkKeyDescriptor} from './nwk-key-descriptor';
Expand Down
2 changes: 1 addition & 1 deletion src/adapter/z-stack/structs/entries/nwk-key-descriptor.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* eslint-disable @typescript-eslint/explicit-function-return-type */

import assert from 'assert';
import assert from 'node:assert';

import {Struct} from '../struct';

Expand Down
2 changes: 1 addition & 1 deletion src/adapter/z-stack/structs/entries/nwk-key.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* eslint-disable @typescript-eslint/explicit-function-return-type */

import assert from 'assert';
import assert from 'node:assert';

import {Struct} from '../struct';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import assert from 'assert';
import assert from 'node:assert';

import {StructMemoryAlignment} from '../struct';
/* eslint-disable @typescript-eslint/explicit-function-return-type */
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import assert from 'assert';
import assert from 'node:assert';

import {StructMemoryAlignment} from '../struct';
/* eslint-disable @typescript-eslint/explicit-function-return-type */
Expand Down
2 changes: 1 addition & 1 deletion src/adapter/z-stack/structs/struct.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import assert from 'assert';
import assert from 'node:assert';

import {SerializableMemoryObject} from './serializable-memory-object';

Expand Down
2 changes: 1 addition & 1 deletion src/adapter/z-stack/structs/table.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import assert from 'assert';
import assert from 'node:assert';

import {SerializableMemoryObject} from './serializable-memory-object';
import {BuiltStruct, StructFactorySignature, StructMemoryAlignment} from './struct';
Expand Down
2 changes: 1 addition & 1 deletion src/adapter/z-stack/unpi/parser.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as stream from 'stream';
import * as stream from 'node:stream';

import {logger} from '../../../utils/logger';
import {DataStart, MinMessageLength, PositionDataLength, SOF} from './constants';
Expand Down
2 changes: 1 addition & 1 deletion src/adapter/z-stack/unpi/writer.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as stream from 'stream';
import * as stream from 'node:stream';

import {logger} from '../../../utils/logger';
import {Frame} from './frame';
Expand Down
6 changes: 3 additions & 3 deletions src/adapter/z-stack/znp/znp.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import assert from 'assert';
import events from 'events';
import net from 'net';
import assert from 'node:assert';
import events from 'node:events';
import net from 'node:net';

import {Queue, wait, Waitress} from '../../../utils';
import {logger} from '../../../utils/logger';
Expand Down
2 changes: 1 addition & 1 deletion src/adapter/z-stack/znp/zpiObject.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import assert from 'assert';
import assert from 'node:assert';

import {ClusterId as ZdoClusterId} from '../../../zspec/zdo';
import {BuffaloZdo} from '../../../zspec/zdo/buffaloZdo';
Expand Down
2 changes: 1 addition & 1 deletion src/adapter/zboss/adapter/zbossAdapter.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* istanbul ignore file */

import assert from 'assert';
import assert from 'node:assert';

import {Adapter, TsType} from '../..';
import {Backup} from '../../../models';
Expand Down
4 changes: 2 additions & 2 deletions src/adapter/zboss/driver.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* istanbul ignore file */

import assert from 'assert';
import EventEmitter from 'events';
import assert from 'node:assert';
import EventEmitter from 'node:events';

import equals from 'fast-deep-equal/es6';

Expand Down
2 changes: 1 addition & 1 deletion src/adapter/zboss/reader.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* istanbul ignore file */

import {Transform, TransformCallback, TransformOptions} from 'stream';
import {Transform, TransformCallback, TransformOptions} from 'node:stream';

import {logger} from '../../utils/logger';
import {SIGNATURE} from './consts';
Expand Down
4 changes: 2 additions & 2 deletions src/adapter/zboss/uart.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* istanbul ignore file */

import {Socket} from 'net';
import EventEmitter from 'stream';
import EventEmitter from 'node:events';
import {Socket} from 'node:net';

import {Queue, wait, Waitress} from '../../utils';
import {logger} from '../../utils/logger';
Expand Down
2 changes: 1 addition & 1 deletion src/adapter/zboss/writer.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* istanbul ignore file */

import {Readable, ReadableOptions} from 'stream';
import {Readable, ReadableOptions} from 'node:stream';

export class ZBOSSWriter extends Readable {
private bytesToWrite: number[];
Expand Down
6 changes: 3 additions & 3 deletions src/adapter/zigate/driver/zigate.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/* istanbul ignore file */

import assert from 'assert';
import {EventEmitter} from 'events';
import net from 'net';
import assert from 'node:assert';
import {EventEmitter} from 'node:events';
import net from 'node:net';

import {DelimiterParser} from '@serialport/parser-delimiter';

Expand Down
6 changes: 3 additions & 3 deletions src/controller/controller.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import assert from 'assert';
import events from 'events';
import fs from 'fs';
import assert from 'node:assert';
import events from 'node:events';
import fs from 'node:fs';

import mixinDeep from 'mixin-deep';

Expand Down
2 changes: 1 addition & 1 deletion src/controller/database.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import fs from 'fs';
import fs from 'node:fs';

import {logger} from '../utils/logger';
import {DatabaseEntry, EntityType} from './tstype';
Expand Down
6 changes: 3 additions & 3 deletions src/controller/greenPower.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import assert from 'assert';
import crypto from 'crypto';
import events from 'events';
import assert from 'node:assert';
import crypto from 'node:crypto';
import events from 'node:events';

import {Adapter, Events as AdapterEvents} from '../adapter';
import {logger} from '../utils/logger';
Expand Down
2 changes: 1 addition & 1 deletion src/controller/model/device.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import assert from 'assert';
import assert from 'node:assert';

import {Events as AdapterEvents} from '../../adapter';
import {LQINeighbor, RoutingTableEntry} from '../../adapter/tstype';
Expand Down
2 changes: 1 addition & 1 deletion src/controller/model/endpoint.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import assert from 'assert';
import assert from 'node:assert';

import {Events as AdapterEvents} from '../../adapter';
import {logger} from '../../utils/logger';
Expand Down
2 changes: 1 addition & 1 deletion src/controller/model/entity.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import events from 'events';
import events from 'node:events';

import {Adapter} from '../../adapter';
import Database from '../database';
Expand Down
2 changes: 1 addition & 1 deletion src/controller/model/group.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import assert from 'assert';
import assert from 'node:assert';

import {logger} from '../../utils/logger';
import * as Zcl from '../../zspec/zcl';
Expand Down
Loading

0 comments on commit b23e10a

Please sign in to comment.