Commit aeeac88

Anton Golub <antongolub@antongolub.com>
2025-06-04 17:49:02
refactor: separate internal helpers
1 parent 608f424
build/deps.js
@@ -1,12 +0,0 @@
-"use strict";
-import "./deno.js"
-import * as __module__ from "./deps.cjs"
-const {
-  installDeps,
-  parseDeps
-} = globalThis.Deno ? globalThis.require("./deps.cjs") : __module__
-export {
-  installDeps,
-  parseDeps
-}
-
build/internals.cjs
@@ -0,0 +1,37 @@
+"use strict";
+const {
+  __export,
+  __toCommonJS
+} = require('./esblib.cjs');
+
+
+// src/internals.ts
+var internals_exports = {};
+__export(internals_exports, {
+  bus: () => bus
+});
+module.exports = __toCommonJS(internals_exports);
+var store = /* @__PURE__ */ new Map();
+var override = store.set.bind(store);
+var wrap = (name, api) => {
+  override(name, api);
+  return new Proxy(api, {
+    get(_, key) {
+      var _a, _b;
+      return store.get(name)[key] || ((_b = (_a = store.get(name)) == null ? void 0 : _a.default) == null ? void 0 : _b[key]);
+    },
+    apply(_, self, args) {
+      return store.get(name).apply(self, args);
+    }
+  });
+};
+var bus = {
+  override,
+  store,
+  wrap
+};
+/* c8 ignore next 100 */
+// Annotate the CommonJS export names for ESM import in node:
+0 && (module.exports = {
+  bus
+});
\ No newline at end of file
build/internals.d.ts
@@ -0,0 +1,5 @@
+export declare const bus: {
+    override: (key: string, value: any) => Map<string, any>;
+    store: Map<string, any>;
+    wrap: <T extends object>(name: string, api: T) => T;
+};
build/util.js
@@ -1,46 +0,0 @@
-"use strict";
-import "./deno.js"
-import * as __module__ from "./util.cjs"
-const {
-  bufArrJoin,
-  bufToString,
-  getLast,
-  getLines,
-  identity,
-  isString,
-  isStringLiteral,
-  noop,
-  once,
-  parseBool,
-  parseDuration,
-  preferLocalBin,
-  proxyOverride,
-  quote,
-  quotePowerShell,
-  randomId,
-  tempdir,
-  tempfile,
-  toCamelCase
-} = globalThis.Deno ? globalThis.require("./util.cjs") : __module__
-export {
-  bufArrJoin,
-  bufToString,
-  getLast,
-  getLines,
-  identity,
-  isString,
-  isStringLiteral,
-  noop,
-  once,
-  parseBool,
-  parseDuration,
-  preferLocalBin,
-  proxyOverride,
-  quote,
-  quotePowerShell,
-  randomId,
-  tempdir,
-  tempfile,
-  toCamelCase
-}
-
build/vendor-core.cjs
@@ -266,7 +266,6 @@ var vendor_core_exports = {};
 __export(vendor_core_exports, {
   VoidStream: () => VoidStream,
   buildCmd: () => buildCmd,
-  bus: () => bus,
   chalk: () => chalk2,
   exec: () => exec,
   isStringLiteral: () => isStringLiteral,
@@ -1371,7 +1370,7 @@ var noop2 = () => {
 var identity = (v) => v;
 var index_default = { kill, lookup, lookupSync, tree, treeSync };
 
-// src/vendor-core.ts
+// src/internals.ts
 var store = /* @__PURE__ */ new Map();
 var override = store.set.bind(store);
 var wrap = (name, api) => {
@@ -1391,15 +1390,16 @@ var bus = {
   store,
   wrap
 };
-var chalk2 = wrap("chalk", source_default);
-var which = wrap("which", import_which.default);
-var ps = wrap("ps", index_default);
+
+// src/vendor-core.ts
+var chalk2 = bus.wrap("chalk", source_default);
+var which = bus.wrap("which", import_which.default);
+var ps = bus.wrap("ps", index_default);
 /* c8 ignore next 100 */
 // Annotate the CommonJS export names for ESM import in node:
 0 && (module.exports = {
   VoidStream,
   buildCmd,
-  bus,
   chalk,
   exec,
   isStringLiteral,
build/vendor-core.d.ts
@@ -341,11 +341,6 @@ export declare class VoidStream extends Transform {
  * @returns TSpawnCtxNormalized
  */
 export declare const exec: (ctx: TSpawnCtx) => TSpawnCtxNormalized;
-export declare const bus: {
-	override: (key: string, value: any) => Map<string, any>;
-	store: Map<string, any>;
-	wrap: <T extends object>(name: string, api: T) => T;
-};
 export type RequestInfo = Parameters<typeof globalThis.fetch>[0];
 type RequestInit$1 = Parameters<typeof globalThis.fetch>[1] & {
 	signal?: AbortSignal;
build/vendor-core.js
@@ -1,24 +0,0 @@
-"use strict";
-import "./deno.js"
-import * as __module__ from "./vendor-core.cjs"
-const {
-  VoidStream,
-  buildCmd,
-  bus,
-  chalk,
-  exec,
-  isStringLiteral,
-  ps,
-  which
-} = globalThis.Deno ? globalThis.require("./vendor-core.cjs") : __module__
-export {
-  VoidStream,
-  buildCmd,
-  bus,
-  chalk,
-  exec,
-  isStringLiteral,
-  ps,
-  which
-}
-
build/vendor-extra.cjs
@@ -466,8 +466,8 @@ var require_to_regex_range = __commonJS({
       let relax = String(opts.relaxZeros);
       let shorthand = String(opts.shorthand);
       let capture = String(opts.capture);
-      let wrap = String(opts.wrap);
-      let cacheKey = min + ":" + max + "=" + relax + shorthand + capture + wrap;
+      let wrap3 = String(opts.wrap);
+      let cacheKey = min + ":" + max + "=" + relax + shorthand + capture + wrap3;
       if (toRegexRange.cache.hasOwnProperty(cacheKey)) {
         return toRegexRange.cache[cacheKey].result;
       }
@@ -737,9 +737,9 @@ var require_fill_range = __commonJS({
     };
     var toRegex = (start, end, options) => {
       if (Array.isArray(start)) {
-        let wrap = options.wrap === true;
+        let wrap3 = options.wrap === true;
         let prefix = options.capture ? "" : "?:";
-        return wrap ? `(${prefix}${start.join("|")})` : start.join("|");
+        return wrap3 ? `(${prefix}${start.join("|")})` : start.join("|");
       }
       return toRegexRange(start, end, options);
     };
@@ -12247,13 +12247,12 @@ var vendor_extra_exports = {};
 __export(vendor_extra_exports, {
   YAML: () => YAML,
   createRequire: () => createRequire,
-  depseek: () => depseekSync,
-  dotenv: () => index_default,
+  depseek: () => depseek,
+  dotenv: () => dotenv,
   fs: () => fs5,
   glob: () => glob,
-  globbyModule: () => globbyModule,
-  minimist: () => import_minimist.default,
-  nodeFetch: () => s
+  minimist: () => minimist,
+  nodeFetch: () => nodeFetch
 });
 module.exports = __toCommonJS(vendor_extra_exports);
 
@@ -19652,7 +19651,29 @@ var populate = (env, extra) => Object.assign(env, extra);
 var config = (def = DOTENV, ...files) => populate(process.env, loadSafe(def, ...files));
 var index_default = { parse: parse2, stringify: stringify4, load, loadSafe, config };
 
+// src/internals.ts
+var store = /* @__PURE__ */ new Map();
+var override = store.set.bind(store);
+var wrap = (name, api) => {
+  override(name, api);
+  return new Proxy(api, {
+    get(_, key) {
+      var _a2, _b2;
+      return store.get(name)[key] || ((_b2 = (_a2 = store.get(name)) == null ? void 0 : _a2.default) == null ? void 0 : _b2[key]);
+    },
+    apply(_, self2, args) {
+      return store.get(name).apply(self2, args);
+    }
+  });
+};
+var bus = {
+  override,
+  store,
+  wrap
+};
+
 // src/vendor-extra.ts
+var { wrap: wrap2 } = bus;
 var globalVar = "Deno" in globalThis ? globalThis : global;
 globalVar.AbortController = globalVar.AbortController || A;
 var createRequire = import_create_require.default;
@@ -19668,11 +19689,17 @@ var globbyModule = {
   isGitIgnored,
   isDynamicPattern
 };
-var glob = Object.assign(function globby2(patterns, options) {
+var _glob = Object.assign(function globby2(patterns, options) {
   return globbyModule.globby(patterns, options);
 }, globbyModule);
-var YAML = browser_exports;
-var fs5 = _fs;
+var _YAML = browser_exports;
+var depseek = wrap2("depseek", depseekSync);
+var dotenv = wrap2("dotenv", index_default);
+var fs5 = wrap2("fs", _fs);
+var YAML = wrap2("YAML", _YAML);
+var glob = wrap2("glob", _glob);
+var nodeFetch = wrap2("nodeFetch", s);
+var minimist = wrap2("minimist", import_minimist.default);
 /* c8 ignore next 100 */
 // Annotate the CommonJS export names for ESM import in node:
 0 && (module.exports = {
@@ -19682,7 +19709,6 @@ var fs5 = _fs;
   dotenv,
   fs,
   glob,
-  globbyModule,
   minimist,
   nodeFetch
 });
\ No newline at end of file
build/vendor-extra.d.ts
@@ -324,34 +324,10 @@ type TOptsNormalized = {
 };
 type TOpts = Partial<TOptsNormalized>;
 declare const depseekSync: (input: string | Buffer, opts?: TOpts) => TCodeRef[];
-/**
- * Return an argument object populated with the array arguments from args
- *
- * @param [args] An optional argument array (typically `process.argv.slice(2)`)
- * @param [opts] An optional options object to customize the parsing
- */
-export declare function minimist(args?: string[], opts?: minimist.Opts): minimist.ParsedArgs;
-/**
- * Return an argument object populated with the array arguments from args. Strongly-typed
- * to be the intersect of type T with minimist.ParsedArgs.
- *
- * `T` The type that will be intersected with minimist.ParsedArgs to represent the argument object
- *
- * @param [args] An optional argument array (typically `process.argv.slice(2)`)
- * @param [opts] An optional options object to customize the parsing
- */
-export declare function minimist<T>(args?: string[], opts?: minimist.Opts): T & minimist.ParsedArgs;
-/**
- * Return an argument object populated with the array arguments from args. Strongly-typed
- * to be the the type T which should extend minimist.ParsedArgs
- *
- * `T` The type that extends minimist.ParsedArgs and represents the argument object
- *
- * @param [args] An optional argument array (typically `process.argv.slice(2)`)
- * @param [opts] An optional options object to customize the parsing
- */
-export declare function minimist<T extends minimist.ParsedArgs>(args?: string[], opts?: minimist.Opts): T;
-export declare namespace minimist {
+declare function minimist(args?: string[], opts?: minimist.Opts): minimist.ParsedArgs;
+declare function minimist<T>(args?: string[], opts?: minimist.Opts): T & minimist.ParsedArgs;
+declare function minimist<T extends minimist.ParsedArgs>(args?: string[], opts?: minimist.Opts): T;
+declare namespace minimist {
 	interface Opts {
 		/**
 		 * A string or array of strings argument names to always treat as strings
@@ -409,7 +385,7 @@ declare const _default: {
 	config: (def?: string, ...files: string[]) => NodeJS.ProcessEnv;
 };
 export declare const createRequire: (filename: string | URL$1) => NodeJS.Require;
-export declare const globbyModule: {
+declare const globbyModule: {
 	convertPathToPattern: typeof convertPathToPattern;
 	globby: typeof globby;
 	sync: typeof globbySync;
@@ -421,8 +397,8 @@ export declare const globbyModule: {
 	isGitIgnored: typeof isGitIgnored;
 	isDynamicPattern: typeof isDynamicPattern;
 };
-export declare const glob: (typeof globbyModule)["globby"] & typeof globbyModule;
-export declare const YAML: YAML;
+declare const _glob: (typeof globbyModule)["globby"] & typeof globbyModule;
+declare const _YAML: YAML;
 export interface YAML {
 	parse(text: string): any;
 	stringify(object: any): string;
@@ -475,13 +451,24 @@ export interface YAML {
 	/** @deprecated */
 	Parser: any;
 }
+export declare const depseek: typeof depseekSync;
+export declare const dotenv: typeof _default;
 declare const fs$1: typeof import("fs-extra");
+export declare const YAML: typeof _YAML;
+export declare const glob: typeof _glob;
+export declare const nodeFetch: typeof fetch$1;
+type Mininist = typeof minimist;
+type MininistOpts = Parameters<Mininist>[1];
+type MinimistParsedArgs = ReturnType<Mininist>;
+declare const minimist$1: Mininist;
+declare namespace minimist$1 {
+	type Opts = MininistOpts;
+	type ParsedArgs = MinimistParsedArgs;
+}
 
 export {
-	_default as dotenv,
-	depseekSync as depseek,
-	fetch$1 as nodeFetch,
 	fs$1 as fs,
+	minimist$1 as minimist,
 };
 
 export {};
build/vendor-extra.js
@@ -1,103 +0,0 @@
-"use strict";
-import "./deno.js"
-import * as __module__ from "./vendor-extra.cjs"
-const {
-  YAML,
-  createRequire,
-  depseek,
-  dotenv,
-  fs,
-  glob,
-  globbyModule,
-  minimist,
-  nodeFetch,
-  Alias,
-  CST,
-  Composer,
-  Document,
-  Lexer,
-  LineCounter,
-  Pair,
-  Parser,
-  Scalar,
-  Schema,
-  YAMLError,
-  YAMLMap,
-  YAMLParseError,
-  YAMLSeq,
-  YAMLWarning,
-  isAlias,
-  isCollection,
-  isDocument,
-  isMap,
-  isNode,
-  isPair,
-  isScalar,
-  isSeq,
-  parse,
-  parseAllDocuments,
-  parseDocument,
-  stringify,
-  visit,
-  visitAsync,
-  BOM,
-  DOCUMENT,
-  FLOW_END,
-  SCALAR,
-  createScalarToken,
-  prettyToken,
-  resolveAsScalar,
-  setScalarValue,
-  tokenType,
-  default: __default__
-} = globalThis.Deno ? globalThis.require("./vendor-extra.cjs") : __module__
-export {
-  YAML,
-  createRequire,
-  depseek,
-  dotenv,
-  fs,
-  glob,
-  globbyModule,
-  minimist,
-  nodeFetch,
-  Alias,
-  CST,
-  Composer,
-  Document,
-  Lexer,
-  LineCounter,
-  Pair,
-  Parser,
-  Scalar,
-  Schema,
-  YAMLError,
-  YAMLMap,
-  YAMLParseError,
-  YAMLSeq,
-  YAMLWarning,
-  isAlias,
-  isCollection,
-  isDocument,
-  isMap,
-  isNode,
-  isPair,
-  isScalar,
-  isSeq,
-  parse,
-  parseAllDocuments,
-  parseDocument,
-  stringify,
-  visit,
-  visitAsync,
-  BOM,
-  DOCUMENT,
-  FLOW_END,
-  SCALAR,
-  createScalarToken,
-  prettyToken,
-  resolveAsScalar,
-  setScalarValue,
-  tokenType
-}
-export default __default__
build/vendor.cjs
@@ -9,38 +9,16 @@ const {
 // src/vendor.ts
 var vendor_exports = {};
 __export(vendor_exports, {
-  YAML: () => YAML,
-  createRequire: () => import_vendor_extra2.createRequire,
-  depseek: () => depseek,
-  dotenv: () => dotenv,
-  fs: () => fs,
-  glob: () => glob,
-  minimist: () => minimist,
-  nodeFetch: () => nodeFetch
+  createRequire: () => import_vendor_extra.createRequire
 });
 module.exports = __toCommonJS(vendor_exports);
-var import_vendor_core = require("./vendor-core.cjs");
-var import_vendor_extra = require("./vendor-extra.cjs");
 __reExport(vendor_exports, require("./vendor-core.cjs"), module.exports);
-var import_vendor_extra2 = require("./vendor-extra.cjs");
-var { wrap } = import_vendor_core.bus;
-var depseek = wrap("depseek", import_vendor_extra.depseek);
-var dotenv = wrap("dotenv", import_vendor_extra.dotenv);
-var fs = wrap("fs", import_vendor_extra.fs);
-var YAML = wrap("YAML", import_vendor_extra.YAML);
-var glob = wrap("glob", import_vendor_extra.glob);
-var nodeFetch = wrap("nodeFetch", import_vendor_extra.nodeFetch);
-var minimist = wrap("minimist", import_vendor_extra.minimist);
+__reExport(vendor_exports, require("./vendor-extra.cjs"), module.exports);
+var import_vendor_extra = require("./vendor-extra.cjs");
 /* c8 ignore next 100 */
 // Annotate the CommonJS export names for ESM import in node:
 0 && (module.exports = {
-  YAML,
   createRequire,
-  depseek,
-  dotenv,
-  fs,
-  glob,
-  minimist,
-  nodeFetch,
-  ...require("./vendor-core.cjs")
+  ...require("./vendor-core.cjs"),
+  ...require("./vendor-extra.cjs")
 });
\ No newline at end of file
build/vendor.d.ts
@@ -1,17 +1,6 @@
 /// <reference types="node" />
 /// <reference types="fs-extra" />
 
-import { depseek as _depseek, dotenv as _dotenv, type minimist as TMinimistNamespace, minimist as _minimist, fs as _fs, YAML as _YAML, glob as _glob, nodeFetch as _nodeFetch } from './vendor-extra.js';
 export * from './vendor-core.js';
+export * from './vendor-extra.js';
 export { createRequire } from './vendor-extra.js';
-export declare const depseek: typeof _depseek;
-export declare const dotenv: typeof _dotenv;
-export declare const fs: typeof _fs;
-export declare const YAML: typeof _YAML;
-export declare const glob: typeof _glob;
-export declare const nodeFetch: typeof _nodeFetch;
-export declare const minimist: typeof _minimist;
-export declare namespace minimist {
-    type Opts = TMinimistNamespace.Opts;
-    type ParsedArgs = TMinimistNamespace.ParsedArgs;
-}
build/vendor.js
@@ -1,40 +0,0 @@
-"use strict";
-import "./deno.js"
-import * as __module__ from "./vendor.cjs"
-const {
-  YAML,
-  createRequire,
-  depseek,
-  dotenv,
-  fs,
-  glob,
-  minimist,
-  nodeFetch,
-  VoidStream,
-  buildCmd,
-  bus,
-  chalk,
-  exec,
-  isStringLiteral,
-  ps,
-  which
-} = globalThis.Deno ? globalThis.require("./vendor.cjs") : __module__
-export {
-  YAML,
-  createRequire,
-  depseek,
-  dotenv,
-  fs,
-  glob,
-  minimist,
-  nodeFetch,
-  VoidStream,
-  buildCmd,
-  bus,
-  chalk,
-  exec,
-  isStringLiteral,
-  ps,
-  which
-}
-
src/internals.ts
@@ -0,0 +1,35 @@
+// Copyright 2025 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.
+
+type TCallable = (...args: any[]) => any
+
+const store = new Map<string, any>()
+const override = store.set.bind(store)
+const wrap = <T extends object>(name: string, api: T): T => {
+  override(name, api)
+  return new Proxy<T>(api, {
+    get(_, key) {
+      return store.get(name)[key] || store.get(name)?.default?.[key]
+    },
+    apply(_, self, args) {
+      return (store.get(name) as TCallable).apply(self, args)
+    },
+  })
+}
+
+export const bus = {
+  override,
+  store,
+  wrap,
+}
src/vendor-core.ts
@@ -15,26 +15,7 @@
 import { default as _chalk } from 'chalk'
 import { default as _which } from 'which'
 import { default as _ps } from '@webpod/ps'
-
-type TCallable = (...args: any[]) => any
-const store = new Map<string, any>()
-const override = store.set.bind(store)
-const wrap = <T extends object>(name: string, api: T): T => {
-  override(name, api)
-  return new Proxy<T>(api, {
-    get(_, key) {
-      return store.get(name)[key] || store.get(name)?.default?.[key]
-    },
-    apply(_, self, args) {
-      return (store.get(name) as TCallable).apply(self, args)
-    },
-  })
-}
-export const bus = {
-  override,
-  store,
-  wrap,
-}
+import { bus } from './internals.ts'
 
 export {
   type TSpawnStore,
@@ -51,6 +32,6 @@ export type RequestInit = Parameters<typeof globalThis.fetch>[1] & {
 }
 
 export { type ChalkInstance } from 'chalk'
-export const chalk: typeof _chalk = wrap('chalk', _chalk)
-export const which: typeof _which = wrap('which', _which)
-export const ps: typeof _ps = wrap('ps', _ps)
+export const chalk: typeof _chalk = bus.wrap('chalk', _chalk)
+export const which: typeof _which = bus.wrap('which', _which)
+export const ps: typeof _ps = bus.wrap('ps', _ps)
src/vendor-extra.ts
@@ -28,9 +28,14 @@ import {
 import * as _yaml from 'yaml'
 import * as _fs from 'fs-extra'
 import _createRequire from 'create-require'
-import { AbortController } from 'node-fetch-native'
+import { fetch as _nodeFetch, AbortController } from 'node-fetch-native'
+import { depseekSync as _depseek } from 'depseek'
+import { default as _minimist } from 'minimist'
+import { default as _dotenv } from 'envapi'
 
-export { fetch as nodeFetch } from 'node-fetch-native'
+import { bus } from './internals.ts'
+
+const { wrap } = bus
 
 // Calculate a global variable for use (Deno/NodeJS) runtime.
 // deno-lint-ignore no-node-globals
@@ -42,7 +47,7 @@ export const createRequire = _createRequire as unknown as (
   filename: string | URL
 ) => NodeJS.Require
 
-export const globbyModule = {
+const globbyModule = {
   convertPathToPattern,
   globby,
   sync: globbySync,
@@ -55,14 +60,14 @@ export const globbyModule = {
   isDynamicPattern,
 }
 
-export const glob = Object.assign(function globby(
+const _glob = Object.assign(function globby(
   patterns: string | readonly string[],
   options?: GlobbyOptions
 ) {
   return globbyModule.globby(patterns, options)
 }, globbyModule) as (typeof globbyModule)['globby'] & typeof globbyModule
 
-export const YAML: YAML = _yaml
+const _YAML: YAML = _yaml
 
 export interface YAML {
   parse(text: string): any
@@ -117,8 +122,18 @@ export interface YAML {
   Parser: any
 }
 
-export const fs: typeof import('fs-extra') = _fs
+export const depseek: typeof _depseek = wrap('depseek', _depseek)
+export const dotenv: typeof _dotenv = wrap('dotenv', _dotenv)
+export const fs: typeof import('fs-extra') = wrap('fs', _fs)
+export const YAML: typeof _YAML = wrap('YAML', _YAML)
+export const glob: typeof _glob = wrap('glob', _glob)
+export const nodeFetch: typeof _nodeFetch = wrap('nodeFetch', _nodeFetch)
 
-export { depseekSync as depseek } from 'depseek'
-export { default as minimist } from 'minimist'
-export { default as dotenv } from 'envapi'
+type Mininist = typeof _minimist
+type MininistOpts = Parameters<Mininist>[1]
+type MinimistParsedArgs = ReturnType<Mininist>
+export const minimist: Mininist = wrap('minimist', _minimist)
+export namespace minimist {
+  export type Opts = MininistOpts
+  export type ParsedArgs = MinimistParsedArgs
+}
src/vendor.ts
@@ -12,31 +12,6 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-import { bus } from './vendor-core.ts'
-import {
-  depseek as _depseek,
-  dotenv as _dotenv,
-  type minimist as TMinimistNamespace,
-  minimist as _minimist,
-  fs as _fs,
-  YAML as _YAML,
-  glob as _glob,
-  nodeFetch as _nodeFetch,
-} from './vendor-extra.ts'
-
 export * from './vendor-core.ts'
+export * from './vendor-extra.ts'
 export { createRequire } from './vendor-extra.ts'
-
-const { wrap } = bus
-export const depseek: typeof _depseek = wrap('depseek', _depseek)
-export const dotenv: typeof _dotenv = wrap('dotenv', _dotenv)
-export const fs: typeof _fs = wrap('fs', _fs)
-export const YAML: typeof _YAML = wrap('YAML', _YAML)
-export const glob: typeof _glob = wrap('glob', _glob)
-export const nodeFetch: typeof _nodeFetch = wrap('nodeFetch', _nodeFetch)
-
-export const minimist: typeof _minimist = wrap('minimist', _minimist)
-export namespace minimist {
-  export type Opts = TMinimistNamespace.Opts
-  export type ParsedArgs = TMinimistNamespace.ParsedArgs
-}
test/deps.test.js
@@ -14,7 +14,7 @@
 
 import assert from 'node:assert'
 import { test, describe } from 'node:test'
-import { $, tmpfile, tmpdir, fs, path } from '../build/index.js'
+import { $, tmpfile, fs, path } from '../build/index.js'
 import { installDeps, parseDeps } from '../build/deps.js'
 
 const __dirname = new URL('.', import.meta.url).pathname
test/package.test.js
@@ -60,6 +60,9 @@ describe('package', () => {
         'build/index.cjs',
         'build/index.d.ts',
         'build/index.js',
+        'build/internals.cjs',
+        'build/internals.d.ts',
+        'build/internals.js',
         'build/log.d.ts',
         'build/md.d.ts',
         'build/util.cjs',
.gitignore
@@ -9,3 +9,10 @@ temp
 test/fixtures/ts-project/build/
 jsr.json
 .npmrc
+
+build/*.js
+!build/cli.js
+!build/core.js
+!build/index.js
+!build/globals.js
+!build/deno.js
.size-limit.json
@@ -24,14 +24,14 @@
   {
     "name": "js parts",
     "path": "build/*.{js,cjs}",
-    "limit": "817.2 kB",
+    "limit": "819.2 kB",
     "brotli": false,
     "gzip": false
   },
   {
     "name": "libdefs",
     "path": "build/*.d.ts",
-    "limit": "40.36 kB",
+    "limit": "39.15 kB",
     "brotli": false,
     "gzip": false
   },
@@ -45,7 +45,7 @@
   {
     "name": "all",
     "path": ["build/*", "man/*", "README.md", "LICENSE"],
-    "limit": "873.95 kB",
+    "limit": "874.70 kB",
     "brotli": false,
     "gzip": false
   }