Commit 8a7a8fe

Anton Golub <antongolub@antongolub.com>
2024-03-28 07:35:20
refactor: rm experimental toggle (#751)
* refactor: rm experimental toggle * chore: rm experimental typeref
1 parent 8925a12
src/cli.ts
@@ -44,7 +44,6 @@ function printUsage() {
    --prefix=<command>   prefix all commands
    --eval=<js>, -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
src/experimental.ts
@@ -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'
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'
test/experimental.test.js
@@ -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', () => {})
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"