@zukhruf/parameterized-test 0.0.0-stage → 0.8.138

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.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 ezzabuzaid
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,207 @@
1
- # Temporary Holding Version
1
+ # @zukhruf/parameterized-test
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ > **Design for review: no code yet.** The README, the glossary and the ADRs are the API on paper. Nothing is built before the maintainer approves them (backlog #5729).
4
+
5
+ `test.each` and `suite.each` for `node:test`. Each row of a table becomes one test with its own name and its own result. One failed row does not hide the other rows.
6
+
7
+ The package imports nothing of zukhruf. It imports only `node:test` and `node:util/types`. Thus the tests of each package can use it, also the tests of the packages that `@zukhruf/testing` depends on ([ADR 0001](./docs/adr/0001-the-package-is-its-own-tool-package-and-imports-nothing-of-zukhruf.md)). The code moves here from `@zukhruf/testing/node`, which goes away with no alias.
8
+
9
+ The words in these documents have one meaning each. See the glossary in [CONTEXT.md](./CONTEXT.md).
10
+
11
+ ## Use it
12
+
13
+ ```sh
14
+ npm install --save-dev @zukhruf/parameterized-test
15
+ ```
16
+
17
+ ```ts
18
+ import { test } from '@zukhruf/parameterized-test';
19
+
20
+ void test.each(
21
+ [
22
+ ['42', 42],
23
+ ['1.5', 1.5],
24
+ ] as const,
25
+ ([input, expected]) =>
26
+ test(`Number reads ${input} as ${expected}`, (t) => {
27
+ t.assert.equal(Number(input), expected);
28
+ }),
29
+ );
30
+ ```
31
+
32
+ The run reports two tests. Each has the name that the register callback gave it.
33
+
34
+ ## Repeat a test for each row
35
+
36
+ Give the table and a register callback to `test.each`. The callback gets the row and its index. It calls `test()` and returns the promise of that call. Names, options (`skip`, `todo`, `only`, `timeout`) and the test context belong to that native call.
37
+
38
+ ```ts
39
+ void test.each(
40
+ [
41
+ { name: 'empty', input: '', valid: false },
42
+ { name: 'digits', input: '0042', valid: true },
43
+ ],
44
+ (row) =>
45
+ test(row.name, { timeout: 1_000 }, (t) => {
46
+ t.assert.equal(/^\d+$/.test(row.input), row.valid);
47
+ }),
48
+ );
49
+ ```
50
+
51
+ ## Repeat a suite for each row
52
+
53
+ `suite.each` repeats a group of tests for each row. Each test acquires and disposes its own resources inside its body.
54
+
55
+ ```ts
56
+ import { suite, test } from '@zukhruf/parameterized-test';
57
+
58
+ void suite.each(['utf8', 'utf16le'] as const, (encoding) =>
59
+ suite(encoding, () => {
60
+ test('round-trips text', (t) => {
61
+ t.assert.equal(
62
+ Buffer.from('hello', encoding).toString(encoding),
63
+ 'hello',
64
+ );
65
+ });
66
+ }),
67
+ );
68
+ ```
69
+
70
+ ## Use it and describe
71
+
72
+ `it` is `test`, and `describe` is `suite`, as in `node:test`.
73
+
74
+ ```ts
75
+ import { describe, it } from '@zukhruf/parameterized-test';
76
+
77
+ void describe.each(['memory', 'sqlite'] as const, (store) =>
78
+ describe(store, () => {
79
+ void it.each([1, 2], (count) =>
80
+ it(`holds ${count} keys`, (t) => {
81
+ t.assert.ok(count > 0);
82
+ }),
83
+ );
84
+ }),
85
+ );
86
+ ```
87
+
88
+ ## Repeat subtests inside a test
89
+
90
+ Inside a test, the register callback can return `t.test()`. Await `test.each` to keep the parent test alive until its subtests end. The subtests then count in the parent's plan, and the parent's `concurrency` controls them.
91
+
92
+ ```ts
93
+ test('parses each form', async (t) => {
94
+ await test.each(['1', '01', '+1'], (input) =>
95
+ t.test(input, (child) => {
96
+ child.assert.equal(Number(input), 1);
97
+ }),
98
+ );
99
+ });
100
+ ```
101
+
102
+ ## Each call and what happens underneath
103
+
104
+ | Call | What happens |
105
+ | --------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
106
+ | `test.each(rows, register)` | Calls `register(row, index)` synchronously, one time for each row, in the order of the table. Returns one promise that resolves when all the native promises resolve. |
107
+ | `register` returns no promise | `each` throws `TypeError('each() callback must return test() or suite()')` at once. The rows before it are already registered. |
108
+ | `rows` is empty | `each` throws `Error('each() requires at least one case')` before it calls `register`. An empty table is a defect of the test, not a pass. |
109
+ | `register` calls `test()` or `suite()` | `node:test` records the file and line of that call, which is in the caller's file. Reports, editor links and `--test-rerun-failures` use that place ([ADR 0003](./docs/adr/0003-the-caller-calls-test-and-each-only-collects-the-native-promise.md)). |
110
+ | `suite.each(rows, register)` | As `test.each`. Inside a suite, the native promises resolve at once. |
111
+ | `test(…)`, `suite(…)`, `it(…)`, `describe(…)` | The native function of `node:test`, through a bound copy ([ADR 0002](./docs/adr/0002-the-exports-are-copies-of-the-functions-of-node-test-and-node-test-stays-unchanged.md)). |
112
+
113
+ A helper that calls `test()` itself puts the file and line of the helper on each row. In #2561 that place was the same for all test files: the saved results of `--test-rerun-failures` collided across files, and a run with a failed row exited 0 on the second pass. The fix, 9832e1ec, moved the `test()` call into the caller's file.
114
+
115
+ ## node:test stays unchanged
116
+
117
+ The exports are copies of `test` and `suite` of `node:test`. Each copy is `fn.bind(undefined)` with the own property descriptors of the native function. Thus the getters `mock`, `snapshot` and `assert` stay lazy getters. On the copy of `test`, `test.test` and `test.it` point to the copy, and `test.suite` and `test.describe` point to the copy of `suite`. Each copy also has `each`.
118
+
119
+ `@zukhruf/testing/node` did `Object.assign(nodeTest, { each })`. That added `each` to the function of `node:test` itself, for each module of the process. This package does not change `node:test`.
120
+
121
+ A probe on Node 26.13.1 ran the same test files through the copies and through `node:test`. The names, the file and line of each test, the status, skip and todo, and the exit codes were the same with no flag, with `--test-only`, with `--test-name-pattern`, with `--test-skip-pattern`, and in three passes of `--test-rerun-failures`. After the import, `node:test`'s `test` had no `each`.
122
+
123
+ ## Errors
124
+
125
+ | Error | When |
126
+ | ------------------------------------------------------------ | ------------------------------------------------------------- |
127
+ | `TypeError('each() callback must return test() or suite()')` | The register callback returned a value that is not a promise. |
128
+ | `Error('each() requires at least one case')` | The table has no rows. |
129
+
130
+ Both errors are thrown synchronously, while the file registers its tests. `node:test` reports the file as failed.
131
+
132
+ ## Scope: now, later, never
133
+
134
+ | When | What |
135
+ | ----- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
136
+ | Now | `test.each`, `suite.each`, `it`, `describe`. |
137
+ | Later | Rows of a matrix (the Cartesian product of two or more tables), when a caller needs them. |
138
+ | Never | printf names (`%s`, `$input`); tagged-template tables; a helper that calls `test()` itself; rows from an external data source; skip or only for each row beyond the options of `node:test`. |
139
+
140
+ ## What the package does not do
141
+
142
+ - **It does not make names.** The register callback writes the name with a template literal. Jest's printf format and `$variable` names add a second language for a thing that JavaScript already does.
143
+ - **It does not read a table from a template literal.** Jest's tagged-template table has rows of type `any`. A readonly array keeps the inferred type of each row.
144
+ - **It does not call `test()` for the caller.** See [ADR 0003](./docs/adr/0003-the-caller-calls-test-and-each-only-collects-the-native-promise.md).
145
+ - **It does not read rows from files, CSV or a database.** JUnit's `@CsvFileSource` and xUnit's `[MemberData]` do. A test reads its file and gives the rows as an array.
146
+ - **It has no own options for skip or only.** Give `skip`, `todo` or `only` to the native call in the register callback.
147
+
148
+ ## Why Node has none
149
+
150
+ Node core decided that `test.each` belongs in userland: nodejs/node [#47902](https://github.com/nodejs/node/issues/47902), and PR [#53716](https://github.com/nodejs/node/pull/53716), closed with "no advantage over array.forEach or a for loop". A `for` loop that calls `test()` gives the same named tests. This package exists to enforce one form. The ESLint rule `zukhruf/prefer-each` reports a loop in a test file that declares tests, and names this package in its message.
151
+
152
+ ## Why each npm candidate failed
153
+
154
+ Probed on 2026-11-26.
155
+
156
+ | Package | Version | Why it failed |
157
+ | ------------------------------- | ------- | --------------------------------------------------------------------------------------------------------------- |
158
+ | `@streetsidesoftware/test-each` | 1.0.0 | Returns no promise. An empty table passes. It calls `test()` itself, so `node:test` records the library's file. |
159
+ | `test-each` | 7.0.1 | Returns no promise. An empty table passes. Four dependencies. |
160
+ | `jest-each` | 30.5.2 | Returns no promise. An empty table becomes a failing test. Needs a stand-in for Jest's globals. Rows are `any`. |
161
+ | `expect-node` | 0.6.0 | Returns no promise. Accepts an empty table. No types. A whole test framework. |
162
+
163
+ ## Who uses it
164
+
165
+ | Consumer | How | Record |
166
+ | --------------------- | ------------------------------------------------------------------------------------------------------------------------------ | ------ |
167
+ | zukhruf test files | 53 files that import `@zukhruf/testing/node` today move to this package; 134 loops in 73 files become `test.each` (2026-11-26) | #5729 |
168
+ | `zukhruf/prefer-each` | Its message names this package in place of `@zukhruf/testing/node` | #5729 |
169
+ | sdk-it | 69 files that import `@zukhruf/testing/node` move here after the release | #5729 |
170
+ | deepagents | 6 files, as above | #5729 |
171
+ | context-compiler | 2 files, as above | #5729 |
172
+
173
+ ## The same concepts in other systems
174
+
175
+ | Concept | Other systems |
176
+ | ---------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
177
+ | Parameterized test | Gerard Meszaros, _xUnit Test Patterns_ (2007), "Parameterized Test" ([xunitpatterns.com](http://xunitpatterns.com/Parameterized%20Test.html)). JUnit 5 `@ParameterizedTest`, in the artifact `junit-jupiter-params` ([guide](https://junit.org/junit5/docs/current/user-guide/#writing-tests-parameterized-tests)). |
178
+ | Table and one named subtest for each row | Go: table-driven tests with `t.Run` ([go.dev/wiki/TableDrivenTests](https://go.dev/wiki/TableDrivenTests)). |
179
+ | Rows as attributes | xUnit.net `[Theory]` with `[InlineData]` or `TheoryData<T>`; NUnit `[TestCase]`; MSTest `[DataRow]`. |
180
+ | `test.each` and `describe.each` | Jest, through its own package `jest-each`, which `jest-circus` depends on. |
181
+
182
+ ## API
183
+
184
+ ```ts
185
+ import type { suite as nodeSuite, test as nodeTest } from 'node:test';
186
+
187
+ /** Calls register synchronously for each row and waits for every native declaration. */
188
+ type Each = <Row>(
189
+ rows: readonly Row[],
190
+ register: (row: Row, index: number) => Promise<void>,
191
+ ) => Promise<void>;
192
+
193
+ /** A copy of test of node:test, with each. node:test stays unchanged. */
194
+ export declare const test: typeof nodeTest & { each: Each };
195
+ /** A copy of suite of node:test, with each. */
196
+ export declare const suite: typeof nodeSuite & { each: Each };
197
+ export { suite as describe, test as it };
198
+ ```
199
+
200
+ ## Documentation
201
+
202
+ **Decisions**
203
+
204
+ - [ADR 0001](./docs/adr/0001-the-package-is-its-own-tool-package-and-imports-nothing-of-zukhruf.md): the package is its own tool package, and it imports nothing of zukhruf.
205
+ - [ADR 0002](./docs/adr/0002-the-exports-are-copies-of-the-functions-of-node-test-and-node-test-stays-unchanged.md): the exports are copies of the functions of `node:test`, and `node:test` stays unchanged.
206
+ - [ADR 0003](./docs/adr/0003-the-caller-calls-test-and-each-only-collects-the-native-promise.md): the caller calls `test()`, and `each` only collects the native promise.
207
+ - [ADR 0004](./docs/adr/0004-the-name-is-parameterized-test-and-the-package-is-public.md): the name is `@zukhruf/parameterized-test`, and the package is public.
@@ -0,0 +1,18 @@
1
+ import { suite as nodeSuite, test as nodeTest } from 'node:test';
2
+ /**
3
+ * Calls `register` at once for each row, in the order of the table, and
4
+ * waits for every native declaration. The caller calls `test()` or
5
+ * `suite()` itself, so node:test records the caller's file and line (ADR
6
+ * 0003).
7
+ */
8
+ declare function each<Row>(rows: readonly Row[], register: (row: Row, index: number) => Promise<void>): Promise<void>;
9
+ /** node:test's `suite` with `each`. */
10
+ export declare const suite: typeof nodeSuite & {
11
+ each: typeof each;
12
+ };
13
+ /** node:test's `test` with `each`. */
14
+ export declare const test: typeof nodeTest & {
15
+ each: typeof each;
16
+ };
17
+ export { suite as describe, test as it };
18
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,IAAI,SAAS,EAAE,IAAI,IAAI,QAAQ,EAAE,MAAM,WAAW,CAAC;AAGjE;;;;;GAKG;AACH,iBAAS,IAAI,CAAC,GAAG,EACf,IAAI,EAAE,SAAS,GAAG,EAAE,EACpB,QAAQ,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,GACnD,OAAO,CAAC,IAAI,CAAC,CAWf;AAkBD,uCAAuC;AACvC,eAAO,MAAM,KAAK,EAAE,OAAO,SAAS,GAAG;IAAE,IAAI,EAAE,OAAO,IAAI,CAAA;CAGzD,CAAC;AAEF,sCAAsC;AACtC,eAAO,MAAM,IAAI,EAAE,OAAO,QAAQ,GAAG;IAAE,IAAI,EAAE,OAAO,IAAI,CAAA;CAGvD,CAAC;AAiBF,OAAO,EAAE,KAAK,IAAI,QAAQ,EAAE,IAAI,IAAI,EAAE,EAAE,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,49 @@
1
+ import { suite as nodeSuite, test as nodeTest } from 'node:test';
2
+ import { isPromise } from 'node:util/types';
3
+ /**
4
+ * Calls `register` at once for each row, in the order of the table, and
5
+ * waits for every native declaration. The caller calls `test()` or
6
+ * `suite()` itself, so node:test records the caller's file and line (ADR
7
+ * 0003).
8
+ */
9
+ function each(rows, register) {
10
+ if (rows.length === 0)
11
+ throw new Error('each() requires at least one case');
12
+ return Promise.all(rows.map((row, index) => {
13
+ const registration = register(row, index);
14
+ if (!isPromise(registration)) {
15
+ throw new TypeError('each() callback must return test() or suite()');
16
+ }
17
+ return registration;
18
+ })).then(() => undefined);
19
+ }
20
+ /** The properties of a function that a bound copy has as its own. */
21
+ const OWN = new Set(['length', 'name', 'prototype']);
22
+ /**
23
+ * The properties of a node:test function, for a bound copy of it, so `each`
24
+ * goes on the copy and node:test stays unchanged (ADR 0002). Descriptors keep
25
+ * the lazy getters (`mock`, `snapshot`, `assert`) lazy.
26
+ */
27
+ function propertiesOf(declaration) {
28
+ return Object.fromEntries(Object.entries(Object.getOwnPropertyDescriptors(declaration)).filter(([key]) => !OWN.has(key)));
29
+ }
30
+ /** node:test's `suite` with `each`. */
31
+ export const suite = Object.assign(Object.defineProperties(nodeSuite.bind(undefined), propertiesOf(nodeSuite)), { each });
32
+ /** node:test's `test` with `each`. */
33
+ export const test = Object.assign(Object.defineProperties(nodeTest.bind(undefined), propertiesOf(nodeTest)), { each });
34
+ // node:test's `test` names itself `test` and `it`, and its suite `suite` and
35
+ // `describe`; on the copy each name gives the copy.
36
+ const own = (value) => ({
37
+ value,
38
+ writable: true,
39
+ enumerable: true,
40
+ configurable: true,
41
+ });
42
+ Object.defineProperties(test, {
43
+ test: own(test),
44
+ it: own(test),
45
+ suite: own(suite),
46
+ describe: own(suite),
47
+ });
48
+ export { suite as describe, test as it };
49
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,IAAI,SAAS,EAAE,IAAI,IAAI,QAAQ,EAAE,MAAM,WAAW,CAAC;AACjE,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE5C;;;;;GAKG;AACH,SAAS,IAAI,CACX,IAAoB,EACpB,QAAoD;IAEpD,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC;QAAE,MAAM,IAAI,KAAK,CAAC,mCAAmC,CAAC,CAAC;IAC5E,OAAO,OAAO,CAAC,GAAG,CAChB,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,KAAK,EAAE,EAAE;QACtB,MAAM,YAAY,GAAG,QAAQ,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;QAC1C,IAAI,CAAC,SAAS,CAAC,YAAY,CAAC,EAAE,CAAC;YAC7B,MAAM,IAAI,SAAS,CAAC,+CAA+C,CAAC,CAAC;QACvE,CAAC;QACD,OAAO,YAAY,CAAC;IACtB,CAAC,CAAC,CACH,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,SAAS,CAAC,CAAC;AAC1B,CAAC;AAED,qEAAqE;AACrE,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC,CAAC,QAAQ,EAAE,MAAM,EAAE,WAAW,CAAC,CAAC,CAAC;AAErD;;;;GAIG;AACH,SAAS,YAAY,CAAC,WAAmB;IACvC,OAAO,MAAM,CAAC,WAAW,CACvB,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,yBAAyB,CAAC,WAAW,CAAC,CAAC,CAAC,MAAM,CAClE,CAAC,CAAC,GAAG,CAAC,EAAE,EAAE,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CACzB,CACF,CAAC;AACJ,CAAC;AAED,uCAAuC;AACvC,MAAM,CAAC,MAAM,KAAK,GAA6C,MAAM,CAAC,MAAM,CAC1E,MAAM,CAAC,gBAAgB,CAAC,SAAS,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE,YAAY,CAAC,SAAS,CAAC,CAAC,EAC3E,EAAE,IAAI,EAAE,CACT,CAAC;AAEF,sCAAsC;AACtC,MAAM,CAAC,MAAM,IAAI,GAA4C,MAAM,CAAC,MAAM,CACxE,MAAM,CAAC,gBAAgB,CAAC,QAAQ,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE,YAAY,CAAC,QAAQ,CAAC,CAAC,EACzE,EAAE,IAAI,EAAE,CACT,CAAC;AAEF,6EAA6E;AAC7E,oDAAoD;AACpD,MAAM,GAAG,GAAG,CAAC,KAAc,EAAsB,EAAE,CAAC,CAAC;IACnD,KAAK;IACL,QAAQ,EAAE,IAAI;IACd,UAAU,EAAE,IAAI;IAChB,YAAY,EAAE,IAAI;CACnB,CAAC,CAAC;AACH,MAAM,CAAC,gBAAgB,CAAC,IAAI,EAAE;IAC5B,IAAI,EAAE,GAAG,CAAC,IAAI,CAAC;IACf,EAAE,EAAE,GAAG,CAAC,IAAI,CAAC;IACb,KAAK,EAAE,GAAG,CAAC,KAAK,CAAC;IACjB,QAAQ,EAAE,GAAG,CAAC,KAAK,CAAC;CACrB,CAAC,CAAC;AAEH,OAAO,EAAE,KAAK,IAAI,QAAQ,EAAE,IAAI,IAAI,EAAE,EAAE,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,41 @@
1
1
  {
2
2
  "name": "@zukhruf/parameterized-test",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "0.8.138",
4
+ "description": "test.each and suite.each for node:test: each row of a table is one test with its own name and result. It imports only node:test, so the tests of every package can use it.",
5
+ "license": "MIT",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "https://github.com/JanuaryLabs/zukhruf",
9
+ "directory": "packages/parameterized-test"
10
+ },
11
+ "bugs": {
12
+ "url": "https://github.com/JanuaryLabs/zukhruf/issues"
13
+ },
14
+ "homepage": "https://github.com/JanuaryLabs/zukhruf/tree/main/packages/parameterized-test#readme",
15
+ "keywords": [
16
+ "node:test",
17
+ "parameterized-test",
18
+ "test.each",
19
+ "table-driven-tests",
20
+ "testing"
21
+ ],
22
+ "type": "module",
23
+ "exports": {
24
+ "./package.json": "./package.json",
25
+ ".": {
26
+ "@zukhruf/source": "./src/index.ts",
27
+ "types": "./dist/index.d.ts",
28
+ "import": "./dist/index.js",
29
+ "default": "./dist/index.js"
30
+ }
31
+ },
32
+ "files": [
33
+ "dist",
34
+ "!dist/spec/**",
35
+ "!**/*.tsbuildinfo",
36
+ "!**/*.test.*"
37
+ ],
38
+ "publishConfig": {
39
+ "access": "public"
40
+ }
41
+ }