Skip to content

Commit 8d84440

Browse files
authored
revert: do not use node: protocol for imports (#3651)
It requires node 14.18.0 or greater, which is way more recent than the earliest node engine we claim to support. --- By submitting this pull request, I confirm that my contribution is made under the terms of the [Apache 2.0 license]. [Apache 2.0 license]: https://www.apache.org/licenses/LICENSE-2.0
1 parent afada33 commit 8d84440

File tree

109 files changed

+189
-254
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

109 files changed

+189
-254
lines changed

eslint-config.yaml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ plugins:
88
- '@typescript-eslint'
99
- import
1010
- prettier
11-
- unicorn
1211

1312
parser: '@typescript-eslint/parser'
1413
parserOptions:
@@ -44,9 +43,6 @@ rules:
4443
'prettier/prettier':
4544
- error
4645

47-
'unicorn/prefer-node-protocol':
48-
- error
49-
5046
'@typescript-eslint/array-type':
5147
- error
5248
- default: array-simple

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
"eslint-import-resolver-typescript": "^3.2.4",
2828
"eslint-plugin-import": "^2.26.0",
2929
"eslint-plugin-prettier": "^4.2.1",
30-
"eslint-plugin-unicorn": "^43.0.0",
3130
"jest": "^28.1.2",
3231
"jest-circus": "^28.1.2",
3332
"jest-config": "^28.1.2",

packages/@jsii/benchmarks/bin/benchmark.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import * as fs from 'fs-extra';
2-
import * as path from 'node:path';
2+
import * as path from 'path';
33
import * as yargs from 'yargs';
44

55
import { benchmarks } from '../lib';

packages/@jsii/benchmarks/lib/benchmark.ts

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
1-
import { Profiler, Session } from 'node:inspector';
2-
import {
3-
performance,
4-
PerformanceObserver,
5-
PerformanceEntry,
6-
} from 'node:perf_hooks';
1+
import { Profiler, Session } from 'inspector';
2+
import { performance, PerformanceObserver, PerformanceEntry } from 'perf_hooks';
73

84
/**
95
* Result of a single run of the subject

packages/@jsii/benchmarks/lib/constants.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import * as path from 'node:path';
1+
import * as path from 'path';
22

33
export const fixturesDir = path.resolve(__dirname, '..', 'fixtures');
44

packages/@jsii/benchmarks/lib/suite/aws-cdk-lib/build-with-jsii.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { Compiler } from 'jsii/lib/compiler';
22
import { loadProjectInfo } from 'jsii/lib/project-info';
3-
import * as path from 'node:path';
4-
import * as process from 'node:process';
3+
import * as path from 'path';
4+
import * as process from 'process';
55
import * as ts from 'typescript';
66

77
import type { Context } from '.';

packages/@jsii/benchmarks/lib/suite/aws-cdk-lib/build-with-tsc.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import * as fs from 'fs-extra';
2-
import * as path from 'node:path';
3-
import * as process from 'node:process';
2+
import * as path from 'path';
3+
import * as process from 'process';
44
import * as ts from 'typescript';
55

66
import type { Context } from '.';

packages/@jsii/benchmarks/lib/suite/aws-cdk-lib/index.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1+
import * as cp from 'child_process';
12
import * as fs from 'fs-extra';
2-
import * as cp from 'node:child_process';
3-
import * as os from 'node:os';
4-
import * as path from 'node:path';
3+
import * as os from 'os';
4+
import * as path from 'path';
55

66
import { cdkTag, cdk } from '../../constants';
77
import { inDirectory, streamUntar } from '../../util';

packages/@jsii/benchmarks/scripts/snapshot-package.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1+
import * as cp from 'child_process';
12
import * as fs from 'fs-extra';
23
import * as glob from 'glob';
3-
import * as cp from 'node:child_process';
4-
import * as os from 'node:os';
5-
import * as path from 'node:path';
4+
import * as os from 'os';
5+
import * as path from 'path';
66
import * as tar from 'tar';
77
import * as ts from 'typescript';
88

packages/@jsii/check-node/src/constants.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import * as process from 'node:process';
1+
import * as process from 'process';
22
import { Range, SemVer } from 'semver';
33

44
const ONE_DAY_IN_MILLISECONDS = 86_400_000;

0 commit comments

Comments
 (0)