BREAKING CHANGE(core): switch to esm

This commit is contained in:
Philipp Kunz 2022-03-24 23:11:53 +01:00
parent b52bb4b474
commit 8b2f541150
10 changed files with 5990 additions and 15254 deletions

21177
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -5,27 +5,27 @@
"description": "network diagnostics", "description": "network diagnostics",
"main": "dist_ts/index.js", "main": "dist_ts/index.js",
"typings": "dist_ts/index.d.ts", "typings": "dist_ts/index.d.ts",
"type": "module",
"author": "Lossless GmbH", "author": "Lossless GmbH",
"license": "MIT", "license": "MIT",
"scripts": { "scripts": {
"test": "(tstest test/)", "test": "(tstest test/)",
"build": "(tsbuild --web)" "build": "(tsbuild --web --allowimplicitany)"
}, },
"devDependencies": { "devDependencies": {
"@gitzone/tsbuild": "^2.1.29", "@gitzone/tsbuild": "^2.1.61",
"@gitzone/tstest": "^1.0.64", "@gitzone/tstest": "^1.0.69",
"@pushrocks/tapbundle": "^4.0.7", "@pushrocks/smartenv": "^5.0.0",
"tslint": "^6.1.3", "@pushrocks/tapbundle": "^5.0.3"
"tslint-config-prettier": "^1.18.0"
}, },
"dependencies": { "dependencies": {
"@pushrocks/smartpromise": "^3.1.6", "@pushrocks/smartpromise": "^3.1.7",
"@pushrocks/smartstring": "^3.0.24", "@pushrocks/smartstring": "^4.0.2",
"@types/default-gateway": "^3.0.1", "@types/default-gateway": "^3.0.1",
"icmp": "^2.0.1", "icmp": "^2.0.1",
"isopen": "^1.3.0", "isopen": "^1.3.0",
"public-ip": "^4.0.4", "public-ip": "^4.0.4",
"systeminformation": "^5.11.3" "systeminformation": "^5.11.9"
}, },
"files": [ "files": [
"ts/**/*", "ts/**/*",

View File

@ -1,6 +1,6 @@
import { tap, expect, expectAsync } from '@pushrocks/tapbundle'; import { tap, expect, expectAsync } from '@pushrocks/tapbundle';
import * as smartnetwork from '../ts'; import * as smartnetwork from '../ts/index.js';
let testSmartnetwork: smartnetwork.SmartNetwork; let testSmartnetwork: smartnetwork.SmartNetwork;

View File

@ -1,5 +1,5 @@
import { expect, expectAsync, tap } from '@pushrocks/tapbundle'; import { expect, expectAsync, tap } from '@pushrocks/tapbundle';
import * as smartnetwork from '../ts/index'; import * as smartnetwork from '../ts/index.js';
let testSmartNetwork: smartnetwork.SmartNetwork; let testSmartNetwork: smartnetwork.SmartNetwork;

View File

@ -1 +1 @@
export * from './smartnetwork.classes.smartnetwork'; export * from './smartnetwork.classes.smartnetwork.js';

View File

@ -1,5 +1,5 @@
import * as plugins from './smartnetwork.plugins'; import * as plugins from './smartnetwork.plugins.js';
import * as stats from './helpers/stats'; import * as stats from './helpers/stats.js';
export class CloudflareSpeed { export class CloudflareSpeed {
constructor() {} constructor() {}

View File

@ -1,6 +1,6 @@
import * as plugins from './smartnetwork.plugins'; import * as plugins from './smartnetwork.plugins.js';
import { CloudflareSpeed } from './smartnetwork.classes.cloudflarespeed'; import { CloudflareSpeed } from './smartnetwork.classes.cloudflarespeed.js';
/** /**
* SmartNetwork simplifies actions within the network * SmartNetwork simplifies actions within the network

View File

@ -12,9 +12,12 @@ import * as smartstring from '@pushrocks/smartstring';
export { smartpromise, smartstring }; export { smartpromise, smartstring };
// @third party scope // @third party scope
const isopen = require('isopen'); // @ts-ignore
const icmp = require('icmp'); import isopen from 'isopen';
import * as publicIp from 'public-ip'; // @ts-ignore
import icmp from 'icmp';
// @ts-ignore
import publicIp from 'public-ip';
import * as systeminformation from 'systeminformation'; import * as systeminformation from 'systeminformation';
export { isopen, icmp, publicIp, systeminformation }; export { isopen, icmp, publicIp, systeminformation };

9
tsconfig.json Normal file
View File

@ -0,0 +1,9 @@
{
"compilerOptions": {
"experimentalDecorators": true,
"useDefineForClassFields": false,
"target": "ES2022",
"module": "ES2022",
"moduleResolution": "nodenext"
}
}

View File

@ -1,17 +0,0 @@
{
"extends": ["tslint:latest", "tslint-config-prettier"],
"rules": {
"semicolon": [true, "always"],
"no-console": false,
"ordered-imports": false,
"object-literal-sort-keys": false,
"member-ordering": {
"options":{
"order": [
"static-method"
]
}
}
},
"defaultSeverity": "warning"
}