From 8a7a8feb829c71ad623195f2c8391c3203c7a58e Mon Sep 17 00:00:00 2001 From: Anton Golub Date: Thu, 28 Mar 2024 09:35:20 +0300 Subject: [PATCH] refactor: rm experimental toggle (#751) * refactor: rm experimental toggle * chore: rm experimental typeref --- package.json | 4 ---- src/cli.ts | 14 +------------- src/experimental.ts | 16 ---------------- test/all.test.js | 1 - test/experimental.test.js | 18 ------------------ 5 files changed, 1 insertion(+), 52 deletions(-) delete mode 100644 src/experimental.ts delete mode 100644 test/experimental.test.js diff --git a/package.json b/package.json index ba957385cb..ae6ce2b582 100644 --- a/package.json +++ b/package.json @@ -13,9 +13,6 @@ "globals": [ "./build/globals.d.ts" ], - "experimental": [ - "./build/experimental.d.ts" - ], "cli": [ "./build/cli.d.ts" ], @@ -27,7 +24,6 @@ "exports": { ".": "./build/index.js", "./globals": "./build/globals.js", - "./experimental": "./build/experimental.js", "./cli": "./build/cli.js", "./core": "./build/core.js", "./package.json": "./package.json" diff --git a/src/cli.ts b/src/cli.ts index 6c35e15409..17d3252e1f 100644 --- a/src/cli.ts +++ b/src/cli.ts @@ -44,7 +44,6 @@ function printUsage() { --prefix= prefix all commands --eval=, -e evaluate script --install, -i install dependencies - --experimental enable experimental features --version, -v print current zx version --help, -h print help --repl start repl @@ -53,15 +52,7 @@ function printUsage() { const argv = minimist(process.argv.slice(2), { string: ['shell', 'prefix', 'eval'], - boolean: [ - 'version', - 'help', - 'quiet', - 'verbose', - 'install', - 'repl', - 'experimental', - ], + boolean: ['version', 'help', 'quiet', 'verbose', 'install', 'repl'], alias: { e: 'eval', i: 'install', v: 'version', h: 'help' }, stopEarly: true, }) @@ -73,9 +64,6 @@ await (async function main() { if (argv.quiet) $.verbose = false if (argv.shell) $.shell = argv.shell if (argv.prefix) $.prefix = argv.prefix - if (argv.experimental) { - Object.assign(global, await import('./experimental.js')) - } if (argv.version) { console.log(getVersion()) return diff --git a/src/experimental.ts b/src/experimental.ts deleted file mode 100644 index f9da9a1f66..0000000000 --- a/src/experimental.ts +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// TODO(antonmedv): Remove this export in next v8 release. -export { spinner, retry, expBackoff, echo } from './goods.js' diff --git a/test/all.test.js b/test/all.test.js index 0d27faf776..db208ae452 100644 --- a/test/all.test.js +++ b/test/all.test.js @@ -15,7 +15,6 @@ import './cli.test.js' import './core.test.js' import './deps.test.js' -import './experimental.test.js' import './extra.test.js' import './global.test.js' import './goods.test.js' diff --git a/test/experimental.test.js b/test/experimental.test.js deleted file mode 100644 index 2a3d60e511..0000000000 --- a/test/experimental.test.js +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import { describe, before } from 'node:test' -import '../build/globals.js' - -describe('experimental', () => {})