@normed/bundle 4.6.3 → 4.7.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -4,8 +4,8 @@ export declare namespace BundlePlugin {
4
4
  type Event<T, A extends unknown[] = never[]> = (v: T, ...args: A) => void | Promise<void>;
5
5
  type Any = Passthrough<any, any[]> | Alteration<any, any, any[]> | Event<any, any[]>;
6
6
  }
7
- import type { Entrypoint, Builder, BuilderBuildResult } from "./types";
8
- import type { NoMatchingBuilder } from "./errors";
7
+ import type { Entrypoint, Builder, BuilderBuildResult } from "./types.ts";
8
+ import type { NoMatchingBuilder } from "./errors.ts";
9
9
  type EstablishedPlugins = {
10
10
  preBuild?: BundlePlugin.Passthrough<Map<{
11
11
  builder: Builder;
@@ -1,5 +1,6 @@
1
- import { RefinementFunctionType } from "@normed/refinements";
2
- import { refinePackageJSON, Platform, BuildConfig } from "./types";
1
+ import type { RefinementFunctionType } from "@normed/refinements";
2
+ import { refinePackageJSON } from "./types.ts";
3
+ import type { Platform, BuildConfig } from "./types.ts";
3
4
  import type { TsconfigRaw } from "esbuild";
4
5
  export declare const refinePlatform: import("@normed/refinements").RefinementFunction<Platform>;
5
6
  export type PackageJson = RefinementFunctionType<typeof refinePackageJSON>;
@@ -16,9 +17,9 @@ export declare const canRefinePackageJson: {
16
17
  root: string | undefined;
17
18
  } | undefined;
18
19
  modifiers: {
19
- [modifier: string]: import("./types").EntryConfig;
20
+ [modifier: string]: import("./types.ts").EntryConfig;
20
21
  };
21
- baseConfig: import("./types").EntryConfig;
22
+ baseConfig: import("./types.ts").EntryConfig;
22
23
  extend: boolean | undefined;
23
24
  entrypoints: string[];
24
25
  }>;
@@ -1,8 +1,8 @@
1
- import { Chalk } from "chalk";
1
+ import type { Chalk } from "chalk";
2
2
  import type { BuildOptions as ESBuild_BuildOptions, TsconfigRaw } from "esbuild";
3
- import { RefinementFunction } from "@normed/refinements";
4
- import type { FileInfo } from "./File";
5
- import { ErrorLog } from "./errors";
3
+ import type { RefinementFunction } from "@normed/refinements";
4
+ import type { FileInfo } from "./File.ts";
5
+ import type { ErrorLog } from "./errors.ts";
6
6
  export type Platform = "web" | "server" | "library";
7
7
  declare class DirectoryInfo {
8
8
  path: string;
@@ -1,5 +1,5 @@
1
1
  import "@normed/json-types";
2
- import { RefinementDefinitionBase, RefinementFunction } from "@normed/refinements";
2
+ import type { RefinementDefinitionBase, RefinementFunction } from "@normed/refinements";
3
3
  import jsonStableStringify from "json-stable-stringify";
4
4
  export declare const stringify: typeof jsonStableStringify;
5
5
  export declare function escapeRegExp(string: string): string;
package/package.json CHANGED
@@ -1,15 +1,20 @@
1
1
  {
2
2
  "name": "@normed/bundle",
3
3
  "author": "Normal Gaussian <normed.bundle@normal-gaussian.com>",
4
- "version": "4.6.3",
4
+ "version": "4.7.1",
5
5
  "bin": "bundles/bin/cli.js",
6
- "main": "bundles/index.js",
7
- "types": "dist",
6
+ "type": "module",
7
+ "exports": {
8
+ ".": {
9
+ "types": "./dist/index.d.ts",
10
+ "default": "./bundles/index.js"
11
+ }
12
+ },
8
13
  "scripts": {
9
- "test": "vite-node $(find src -name '*.test.ts')",
14
+ "test": "yarn node --experimental-transform-types --test 'src/**/*.test.ts'",
10
15
  "clean": "echo \"Not cleaning\"",
11
16
  "really-clean": "rm -rf dist bundles bundles-a",
12
- "publish": "yarn npm publish --tolerate-republish",
17
+ "publish": "yarn npm publish --tolerate-republish --provenance",
13
18
  "build": "tsc --project tsconfig.json && node dist/bin/cli.js --outdir bundles-a && node bundles-a/bin/cli.js && diff -r bundles-a bundles",
14
19
  "build-a": "tsc --project tsconfig.json && node dist/bin/cli.js --outdir bundles-a",
15
20
  "build-dist": "tsc --project tsconfig.json"
@@ -31,7 +36,10 @@
31
36
  "typescript"
32
37
  ],
33
38
  "platform": "node",
34
- "format": "cjs"
39
+ "format": "esm",
40
+ "banner": {
41
+ "js": "import { createRequire as __bundleCR } from 'module'; const require = __bundleCR(import.meta.url);"
42
+ }
35
43
  }
36
44
  }
37
45
  }
@@ -40,15 +48,14 @@
40
48
  "@normed/json-types": "^1.0.8",
41
49
  "@normed/refinements": "^0.9.0",
42
50
  "@types/fs-extra": "^11.0.4",
43
- "@types/node": "^24.0.10",
51
+ "@types/node": "^25.3.3",
44
52
  "@types/pug": "^2.0.10",
45
- "@yarnpkg/pnpify": "^4.1.5",
53
+ "@yarnpkg/pnpify": "^4.1.6",
46
54
  "chalk": "^4.1.2",
47
- "filesystem-traverse": "^3.0.0",
48
- "fs-extra": "^11.3.0",
49
- "less": "^4.3.0",
50
- "pug": "^3.0.3",
51
- "vite-node": "^2.1.9"
55
+ "filesystem-traverse": "^4.1.1",
56
+ "fs-extra": "^11.3.4",
57
+ "less": "^4.5.1",
58
+ "pug": "^3.0.3"
52
59
  },
53
60
  "files": [
54
61
  "bundles/**/*",
@@ -60,10 +67,14 @@
60
67
  },
61
68
  "dependencies": {
62
69
  "@yarnpkg/esbuild-plugin-pnp": "^3.0.0-rc.15",
63
- "esbuild": "^0.25.5",
70
+ "esbuild": "^0.27.3",
64
71
  "json-stable-stringify": "^1.3.0",
65
- "pino": "^9.7.0",
66
- "typescript": "^5.8.3"
72
+ "pino": "^9.14.0",
73
+ "typescript": "^5.9.3"
74
+ },
75
+ "repository": {
76
+ "type": "git",
77
+ "url": "https://gitlab.com/normed/bundle"
67
78
  },
68
79
  "license": "MIT",
69
80
  "os": [
@@ -80,4 +91,4 @@
80
91
  "glibc",
81
92
  "musl"
82
93
  ]
83
- }
94
+ }