@o3co/ts.hocon 0.1.0 → 0.1.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.
Files changed (106) hide show
  1. package/README.ja.md +49 -0
  2. package/README.md +49 -0
  3. package/dist/config-D4EyvNd8.d.cts +31 -0
  4. package/dist/config-D4EyvNd8.d.ts +31 -0
  5. package/dist/index.cjs +883 -0
  6. package/dist/index.d.cts +39 -0
  7. package/dist/index.d.ts +39 -0
  8. package/dist/index.js +839 -0
  9. package/dist/zod.cjs +39 -0
  10. package/dist/zod.d.cts +7 -0
  11. package/dist/zod.d.ts +7 -0
  12. package/dist/zod.js +13 -0
  13. package/package.json +13 -10
  14. package/.github/ISSUE_TEMPLATE/bug_report.md +0 -29
  15. package/.github/ISSUE_TEMPLATE/feature_request.md +0 -23
  16. package/.github/pull_request_template.md +0 -17
  17. package/.github/workflows/lint.yml +0 -33
  18. package/.github/workflows/release.yml +0 -41
  19. package/.github/workflows/test.yml +0 -53
  20. package/CHANGELOG.md +0 -22
  21. package/CONTRIBUTING.md +0 -62
  22. package/SECURITY.md +0 -20
  23. package/docs/superpowers/plans/2026-03-20-ts-hocon.md +0 -2412
  24. package/docs/superpowers/specs/2026-03-20-ts-hocon-design.md +0 -368
  25. package/src/config.ts +0 -108
  26. package/src/errors.ts +0 -34
  27. package/src/index.ts +0 -5
  28. package/src/internal/lexer/lexer.ts +0 -168
  29. package/src/internal/lexer/token.ts +0 -20
  30. package/src/internal/parser/ast.ts +0 -17
  31. package/src/internal/parser/parser.ts +0 -229
  32. package/src/internal/resolver/resolver.ts +0 -428
  33. package/src/parse.ts +0 -79
  34. package/src/value.ts +0 -5
  35. package/src/zod.ts +0 -12
  36. package/tests/config.test.ts +0 -100
  37. package/tests/errors.test.ts +0 -43
  38. package/tests/lexer.test.ts +0 -141
  39. package/tests/lightbend/lightbend.test.ts +0 -39
  40. package/tests/lightbend/testdata/a_1.conf +0 -1
  41. package/tests/lightbend/testdata/b_2.conf +0 -1
  42. package/tests/lightbend/testdata/beanconfig/beanconfig01.conf +0 -131
  43. package/tests/lightbend/testdata/bom.conf +0 -2
  44. package/tests/lightbend/testdata/cycle.conf +0 -1
  45. package/tests/lightbend/testdata/env-variables.conf +0 -16
  46. package/tests/lightbend/testdata/equiv01/comments.conf +0 -45
  47. package/tests/lightbend/testdata/equiv01/equals.conf +0 -41
  48. package/tests/lightbend/testdata/equiv01/no-commas.conf +0 -55
  49. package/tests/lightbend/testdata/equiv01/no-root-braces.conf +0 -40
  50. package/tests/lightbend/testdata/equiv01/no-whitespace.json +0 -1
  51. package/tests/lightbend/testdata/equiv01/omit-colons.conf +0 -44
  52. package/tests/lightbend/testdata/equiv01/original.json +0 -41
  53. package/tests/lightbend/testdata/equiv01/path-keys.conf +0 -29
  54. package/tests/lightbend/testdata/equiv01/properties-style.conf +0 -37
  55. package/tests/lightbend/testdata/equiv01/substitutions.conf +0 -41
  56. package/tests/lightbend/testdata/equiv01/unquoted.conf +0 -41
  57. package/tests/lightbend/testdata/equiv02/original.json +0 -17
  58. package/tests/lightbend/testdata/equiv02/path-keys-weird-whitespace.conf +0 -32
  59. package/tests/lightbend/testdata/equiv02/path-keys.conf +0 -9
  60. package/tests/lightbend/testdata/equiv03/includes.conf +0 -7
  61. package/tests/lightbend/testdata/equiv03/letters/a.conf +0 -6
  62. package/tests/lightbend/testdata/equiv03/letters/b.json +0 -3
  63. package/tests/lightbend/testdata/equiv03/letters/c.conf +0 -2
  64. package/tests/lightbend/testdata/equiv03/letters/c.properties +0 -1
  65. package/tests/lightbend/testdata/equiv03/letters/numbers/1.conf +0 -1
  66. package/tests/lightbend/testdata/equiv03/letters/numbers/2.properties +0 -1
  67. package/tests/lightbend/testdata/equiv03/original.json +0 -15
  68. package/tests/lightbend/testdata/equiv03/root/foo.conf +0 -1
  69. package/tests/lightbend/testdata/equiv04/missing-substitutions.conf +0 -4
  70. package/tests/lightbend/testdata/equiv04/original.json +0 -3
  71. package/tests/lightbend/testdata/equiv05/original.json +0 -16
  72. package/tests/lightbend/testdata/equiv05/triple-quotes.conf +0 -20
  73. package/tests/lightbend/testdata/file-include.conf +0 -5
  74. package/tests/lightbend/testdata/include-from-list.conf +0 -5
  75. package/tests/lightbend/testdata/onclasspath.conf +0 -2
  76. package/tests/lightbend/testdata/subdir/bar-file.conf +0 -1
  77. package/tests/lightbend/testdata/subdir/bar.conf +0 -1
  78. package/tests/lightbend/testdata/subdir/baz.conf +0 -1
  79. package/tests/lightbend/testdata/subdir/foo.conf +0 -5
  80. package/tests/lightbend/testdata/test01.conf +0 -96
  81. package/tests/lightbend/testdata/test01.json +0 -4
  82. package/tests/lightbend/testdata/test01.properties +0 -5
  83. package/tests/lightbend/testdata/test02.conf +0 -13
  84. package/tests/lightbend/testdata/test03-included.conf +0 -9
  85. package/tests/lightbend/testdata/test03.conf +0 -36
  86. package/tests/lightbend/testdata/test04.conf +0 -305
  87. package/tests/lightbend/testdata/test05.conf +0 -154
  88. package/tests/lightbend/testdata/test06.conf +0 -14
  89. package/tests/lightbend/testdata/test07.conf +0 -4
  90. package/tests/lightbend/testdata/test08.conf +0 -6
  91. package/tests/lightbend/testdata/test09.conf +0 -17
  92. package/tests/lightbend/testdata/test10.conf +0 -11
  93. package/tests/lightbend/testdata/test11.conf +0 -7
  94. package/tests/lightbend/testdata/test12.conf +0 -43
  95. package/tests/lightbend/testdata/test13-application-override-substitutions.conf +0 -1
  96. package/tests/lightbend/testdata/test13-reference-bad-substitutions.conf +0 -1
  97. package/tests/lightbend/testdata/test13-reference-with-substitutions.conf +0 -2
  98. package/tests/lightbend/testdata/validate-invalid.conf +0 -30
  99. package/tests/lightbend/testdata/validate-reference.conf +0 -32
  100. package/tests/parse.test.ts +0 -44
  101. package/tests/parser.test.ts +0 -154
  102. package/tests/resolver.test.ts +0 -159
  103. package/tests/zod.test.ts +0 -57
  104. package/tsconfig.json +0 -16
  105. package/tsup.config.ts +0 -12
  106. package/vitest.config.ts +0 -7
@@ -1,32 +0,0 @@
1
- string1="foo"
2
- string2="bar"
3
- string3="baz"
4
- string4="hello"
5
- int1=10
6
- int2=11
7
- int3=12
8
- float1=3.14
9
- float2=3.2
10
- float3=3.3
11
- bool1=true
12
- bool2=false
13
- bool3=true
14
- null1=null
15
- null2=null
16
- null3=null
17
- object1={ a : b }
18
- object2={ c : d }
19
- object3={ e : f }
20
- array1=[1,2,3]
21
- array2=[a,b,c]
22
- array3=[true, true, false]
23
- array4=[{}, {}]
24
- array5=[]
25
- emptyArray1=[]
26
- emptyArray2=[]
27
- willBeMissing=90009
28
-
29
- a.b.c.d.e.f.g = true
30
- a.b.c.d.e.f.h = true
31
- a.b.c.d.e.f.i = true
32
- a.b.c.d.e.f.j = true
@@ -1,44 +0,0 @@
1
- // tests/parse.test.ts
2
- import { describe, it, expect } from 'vitest'
3
- import { parse, parseAsync } from '../src/parse.js'
4
- import { ParseError, ResolveError } from '../src/errors.js'
5
-
6
- describe('parse()', () => {
7
- it('parses basic config', () => {
8
- const c = parse('server { host = "localhost"\nport = 8080 }')
9
- expect(c.getString('server.host')).toBe('localhost')
10
- expect(c.getNumber('server.port')).toBe(8080)
11
- })
12
-
13
- it('resolves substitutions end-to-end', () => {
14
- const c = parse('base = "hello"\ngreeting = ${base}" world"')
15
- expect(c.getString('greeting')).toBe('hello world')
16
- })
17
-
18
- it('uses env option for substitution fallback', () => {
19
- const c = parse('val = ${MY_ENV}', { env: { MY_ENV: 'from-env' } })
20
- expect(c.getString('val')).toBe('from-env')
21
- })
22
-
23
- it('uses process.env as default env', () => {
24
- process.env['HOCON_TEST_VAR'] = 'test-value'
25
- const c = parse('val = ${HOCON_TEST_VAR}')
26
- expect(c.getString('val')).toBe('test-value')
27
- delete process.env['HOCON_TEST_VAR']
28
- })
29
-
30
- it('throws ParseError for syntax errors', () => {
31
- expect(() => parse('{ unclosed')).toThrow(ParseError)
32
- })
33
-
34
- it('throws ResolveError for unresolved substitution', () => {
35
- expect(() => parse('x = ${missing}')).toThrow(ResolveError)
36
- })
37
- })
38
-
39
- describe('parseAsync()', () => {
40
- it('parses basic config asynchronously', async () => {
41
- const c = await parseAsync('host = "localhost"')
42
- expect(c.getString('host')).toBe('localhost')
43
- })
44
- })
@@ -1,154 +0,0 @@
1
- // tests/parser.test.ts
2
- import { describe, it, expect } from 'vitest'
3
- import { tokenize } from '../src/internal/lexer/lexer.js'
4
- import { parseTokens } from '../src/internal/parser/parser.js'
5
- import type { AstNode } from '../src/internal/parser/ast.js'
6
-
7
- function parse(input: string): AstNode {
8
- return parseTokens(tokenize(input))
9
- }
10
-
11
- describe('parseTokens', () => {
12
- it('parses empty input as empty object', () => {
13
- const node = parse('')
14
- expect(node.kind).toBe('object')
15
- if (node.kind === 'object') expect(node.fields).toHaveLength(0)
16
- })
17
-
18
- it('parses key = value', () => {
19
- const node = parse('host = "localhost"')
20
- expect(node.kind).toBe('object')
21
- if (node.kind === 'object') {
22
- expect(node.fields[0]!.key).toEqual(['host'])
23
- expect(node.fields[0]!.value.kind).toBe('scalar')
24
- }
25
- })
26
-
27
- it('parses key: value (colon syntax)', () => {
28
- const node = parse('port: 8080')
29
- if (node.kind === 'object') {
30
- expect(node.fields[0]!.key).toEqual(['port'])
31
- }
32
- })
33
-
34
- it('parses dot-notation keys', () => {
35
- const node = parse('server.host = "localhost"')
36
- if (node.kind === 'object') {
37
- expect(node.fields[0]!.key).toEqual(['server', 'host'])
38
- }
39
- })
40
-
41
- it('does not split quoted keys at dots', () => {
42
- const node = parse('"a.b" = 1')
43
- if (node.kind === 'object') {
44
- expect(node.fields[0]!.key).toEqual(['a.b'])
45
- }
46
- })
47
-
48
- it('parses nested objects (brace syntax)', () => {
49
- const node = parse('server { host = "localhost" }')
50
- expect(node.kind).toBe('object')
51
- if (node.kind === 'object') {
52
- expect(node.fields[0]!.key).toEqual(['server'])
53
- expect(node.fields[0]!.value.kind).toBe('object')
54
- }
55
- })
56
-
57
- it('parses arrays', () => {
58
- const node = parse('list = [1, 2, 3]')
59
- if (node.kind === 'object') {
60
- const arr = node.fields[0]!.value
61
- expect(arr.kind).toBe('array')
62
- if (arr.kind === 'array') expect(arr.items).toHaveLength(3)
63
- }
64
- })
65
-
66
- it('parses boolean and null scalars', () => {
67
- const node = parse('a = true\nb = false\nc = null')
68
- if (node.kind === 'object') {
69
- const vals = node.fields.map(f => f.value)
70
- expect(vals[0]!.kind === 'scalar' && vals[0]!.value).toBe(true)
71
- expect(vals[1]!.kind === 'scalar' && vals[1]!.value).toBe(false)
72
- expect(vals[2]!.kind === 'scalar' && vals[2]!.value).toBe(null)
73
- }
74
- })
75
-
76
- it('parses integer scalars', () => {
77
- const node = parse('port = 8080')
78
- if (node.kind === 'object') {
79
- const val = node.fields[0]!.value
80
- expect(val.kind === 'scalar' && val.value).toBe(8080)
81
- }
82
- })
83
-
84
- it('parses float scalars', () => {
85
- const node = parse('ratio = 1.5')
86
- if (node.kind === 'object') {
87
- const val = node.fields[0]!.value
88
- expect(val.kind === 'scalar' && val.value).toBe(1.5)
89
- }
90
- })
91
-
92
- it('parses substitutions', () => {
93
- const node = parse('host = ${server.host}')
94
- if (node.kind === 'object') {
95
- const val = node.fields[0]!.value
96
- expect(val.kind).toBe('subst')
97
- if (val.kind === 'subst') {
98
- expect(val.path).toBe('server.host')
99
- expect(val.optional).toBe(false)
100
- }
101
- }
102
- })
103
-
104
- it('parses optional substitutions', () => {
105
- const node = parse('host = ${?server.host}')
106
- if (node.kind === 'object') {
107
- const val = node.fields[0]!.value
108
- if (val.kind === 'subst') expect(val.optional).toBe(true)
109
- }
110
- })
111
-
112
- it('parses concat (adjacent tokens on same line, no space)', () => {
113
- const node = parse('url = "http://"${host}":8080"')
114
- if (node.kind === 'object') {
115
- expect(node.fields[0]!.value.kind).toBe('concat')
116
- }
117
- })
118
-
119
- it('parses += append operator', () => {
120
- const node = parse('list += 1')
121
- if (node.kind === 'object') {
122
- expect(node.fields[0]!.append).toBe(true)
123
- }
124
- })
125
-
126
- it('parses include directive', () => {
127
- const node = parse('include "other.conf"')
128
- if (node.kind === 'object') {
129
- expect(node.fields[0]!.key).toHaveLength(0)
130
- expect(node.fields[0]!.value.kind).toBe('include')
131
- }
132
- })
133
-
134
- it('parses include file(...) syntax', () => {
135
- const node = parse('include file("other.conf")')
136
- if (node.kind === 'object') {
137
- expect(node.fields[0]!.value.kind).toBe('include')
138
- }
139
- })
140
-
141
- it('chains two quoted key segments with a dot', () => {
142
- const node = parse('"a"."b" = 1')
143
- if (node.kind === 'object') {
144
- expect(node.fields[0]!.key).toEqual(['a', 'b'])
145
- }
146
- })
147
-
148
- it('chains three quoted key segments with dots', () => {
149
- const node = parse('"a"."b"."c" = 1')
150
- if (node.kind === 'object') {
151
- expect(node.fields[0]!.key).toEqual(['a', 'b', 'c'])
152
- }
153
- })
154
- })
@@ -1,159 +0,0 @@
1
- // tests/resolver.test.ts
2
- import { describe, it, expect } from 'vitest'
3
- import { tokenize } from '../src/internal/lexer/lexer.js'
4
- import { parseTokens } from '../src/internal/parser/parser.js'
5
- import { resolve } from '../src/internal/resolver/resolver.js'
6
- import type { HoconValue } from '../src/value.js'
7
- import { ResolveError } from '../src/errors.js'
8
-
9
- function resolveStr(input: string, env: Record<string, string> = {}): HoconValue {
10
- const ast = parseTokens(tokenize(input))
11
- return resolve(ast, { env, baseDir: undefined, readFileSync: () => { throw new Error('no fs') } })
12
- }
13
-
14
- function obj(v: HoconValue): Map<string, HoconValue> {
15
- if (v.kind !== 'object') throw new Error('expected object')
16
- return v.fields
17
- }
18
-
19
- describe('Resolver - Pass 1 (structure)', () => {
20
- it('resolves simple string value', () => {
21
- const v = resolveStr('host = "localhost"')
22
- expect(obj(v).get('host')).toEqual({ kind: 'scalar', value: 'localhost' })
23
- })
24
-
25
- it('resolves number value', () => {
26
- const v = resolveStr('port = 8080')
27
- expect(obj(v).get('port')).toEqual({ kind: 'scalar', value: 8080 })
28
- })
29
-
30
- it('resolves nested objects', () => {
31
- const v = resolveStr('server { host = "localhost" }')
32
- const server = obj(v).get('server')
33
- expect(server?.kind).toBe('object')
34
- })
35
-
36
- it('merges duplicate object keys', () => {
37
- const v = resolveStr('server { host = "a" }\nserver { port = 8080 }')
38
- const server = obj(v).get('server')
39
- if (server?.kind === 'object') {
40
- expect(server.fields.has('host')).toBe(true)
41
- expect(server.fields.has('port')).toBe(true)
42
- }
43
- })
44
-
45
- it('last value wins for scalar keys', () => {
46
- const v = resolveStr('x = 1\nx = 2')
47
- expect(obj(v).get('x')).toEqual({ kind: 'scalar', value: 2 })
48
- })
49
-
50
- it('resolves arrays', () => {
51
- const v = resolveStr('list = [1, 2, 3]')
52
- const arr = obj(v).get('list')
53
- expect(arr?.kind).toBe('array')
54
- if (arr?.kind === 'array') expect(arr.items).toHaveLength(3)
55
- })
56
-
57
- it('handles += on existing array', () => {
58
- const v = resolveStr('list = [1, 2]\nlist += 3')
59
- const arr = obj(v).get('list')
60
- if (arr?.kind === 'array') expect(arr.items).toHaveLength(3)
61
- })
62
-
63
- it('handles += on missing key (starts from empty array)', () => {
64
- const v = resolveStr('list += 1')
65
- const arr = obj(v).get('list')
66
- if (arr?.kind === 'array') expect(arr.items).toHaveLength(1)
67
- })
68
-
69
- it('preserves Map insertion order', () => {
70
- const v = resolveStr('c = 3\na = 1\nb = 2')
71
- const keys = [...obj(v).keys()]
72
- expect(keys).toEqual(['c', 'a', 'b'])
73
- })
74
- })
75
-
76
- describe('Resolver - Pass 2 (substitutions)', () => {
77
- it('resolves ${path} substitution', () => {
78
- const v = resolveStr('host = "localhost"\nurl = ${host}')
79
- expect(obj(v).get('url')).toEqual({ kind: 'scalar', value: 'localhost' })
80
- })
81
-
82
- it('resolves nested path substitution', () => {
83
- const v = resolveStr('server { host = "x" }\nhost = ${server.host}')
84
- expect(obj(v).get('host')).toEqual({ kind: 'scalar', value: 'x' })
85
- })
86
-
87
- it('resolves ${?path} optional substitution (path exists)', () => {
88
- const v = resolveStr('a = 1\nb = ${?a}')
89
- expect(obj(v).get('b')).toEqual({ kind: 'scalar', value: 1 })
90
- })
91
-
92
- it('drops field for ${?path} optional substitution (path missing)', () => {
93
- const v = resolveStr('b = ${?missing}')
94
- expect(obj(v).get('b')).toBeUndefined()
95
- })
96
-
97
- it('throws ResolveError for unresolved mandatory substitution', () => {
98
- expect(() => resolveStr('b = ${missing}')).toThrow(ResolveError)
99
- })
100
-
101
- it('falls back to env for unresolved substitution', () => {
102
- const v = resolveStr('b = ${MY_VAR}', { MY_VAR: 'hello' })
103
- expect(obj(v).get('b')).toEqual({ kind: 'scalar', value: 'hello' })
104
- })
105
-
106
- it('resolves self-referential substitution', () => {
107
- const v = resolveStr('path = "/usr"\npath = ${path}:/extra')
108
- // concat resolves: "/usr" + ":/extra" = "/usr:/extra"
109
- const result = obj(v).get('path')
110
- if (result?.kind === 'scalar') expect(String(result.value)).toContain('/usr')
111
- })
112
-
113
- it('resolves string concat with substitution', () => {
114
- const v = resolveStr('host = "localhost"\nurl = "http://"${host}')
115
- const result = obj(v).get('url')
116
- expect(result?.kind === 'scalar' && result.value).toBe('http://localhost')
117
- })
118
-
119
- it('throws ResolveError on circular substitution', () => {
120
- expect(() => resolveStr('a = ${b}\nb = ${a}')).toThrow(ResolveError)
121
- })
122
-
123
- it('resolves forward-reference substitution', () => {
124
- const v = resolveStr('url = $' + '{host}\nhost = "localhost"')
125
- expect(obj(v).get('url')).toEqual({ kind: 'scalar', value: 'localhost' })
126
- })
127
- })
128
-
129
- describe('Resolver - include', () => {
130
- function resolveWithFs(input: string, files: Record<string, string>): HoconValue {
131
- const ast = parseTokens(tokenize(input))
132
- return resolve(ast, {
133
- env: {},
134
- baseDir: '/fake',
135
- readFileSync: (p: string) => {
136
- const key = p.replace('/fake/', '')
137
- if (!(key in files)) throw new Error(`file not found: ${p}`)
138
- return files[key] ?? ''
139
- },
140
- })
141
- }
142
-
143
- it('merges included file into current object', () => {
144
- const v = resolveWithFs('include "other.conf"\nport = 8080', {
145
- 'other.conf': 'host = "localhost"',
146
- })
147
- expect(obj(v).get('host')).toEqual({ kind: 'scalar', value: 'localhost' })
148
- expect(obj(v).get('port')).toEqual({ kind: 'scalar', value: 8080 })
149
- })
150
-
151
- it('throws ResolveError on circular include', () => {
152
- expect(() =>
153
- resolveWithFs('include "a.conf"', {
154
- 'a.conf': 'include "b.conf"',
155
- 'b.conf': 'include "a.conf"',
156
- })
157
- ).toThrow(ResolveError)
158
- })
159
- })
package/tests/zod.test.ts DELETED
@@ -1,57 +0,0 @@
1
- import { describe, it, expect } from 'vitest'
2
- import { z } from 'zod'
3
- import { parse } from '../src/parse.js'
4
- import { validate, getValidated } from '../src/zod.js'
5
-
6
- const cfg = parse(`
7
- server {
8
- host = "localhost"
9
- port = 8080
10
- }
11
- debug = false
12
- `)
13
-
14
- describe('validate()', () => {
15
- it('validates and returns typed object', () => {
16
- const Schema = z.object({
17
- server: z.object({
18
- host: z.string(),
19
- port: z.number().int(),
20
- }),
21
- debug: z.boolean(),
22
- })
23
- const result = validate(cfg, Schema)
24
- expect(result.server.host).toBe('localhost')
25
- expect(result.server.port).toBe(8080)
26
- expect(result.debug).toBe(false)
27
- })
28
-
29
- it('throws ZodError on schema mismatch', () => {
30
- const Schema = z.object({ server: z.object({ host: z.number() }) })
31
- expect(() => validate(cfg, Schema)).toThrow()
32
- })
33
-
34
- it('supports Zod transforms (e.g., coerce)', () => {
35
- const c = parse('timeout = "30"')
36
- const Schema = z.object({ timeout: z.coerce.number() })
37
- const result = validate(c, Schema)
38
- expect(result.timeout).toBe(30)
39
- })
40
- })
41
-
42
- describe('getValidated()', () => {
43
- it('returns typed value at path', () => {
44
- const port = getValidated(cfg, 'server.port', z.number().int())
45
- expect(port).toBe(8080)
46
- // TypeScript should infer `port` as `number`
47
- const _check: number = port
48
- })
49
-
50
- it('throws ZodError on schema mismatch at path', () => {
51
- expect(() => getValidated(cfg, 'server.host', z.number())).toThrow()
52
- })
53
-
54
- it('throws on missing path', () => {
55
- expect(() => getValidated(cfg, 'missing.path', z.string())).toThrow()
56
- })
57
- })
package/tsconfig.json DELETED
@@ -1,16 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "target": "ES2020",
4
- "lib": ["ES2020"],
5
- "module": "NodeNext",
6
- "moduleResolution": "NodeNext",
7
- "strict": true,
8
- "declaration": true,
9
- "declarationMap": true,
10
- "outDir": "dist",
11
- "rootDir": "src",
12
- "skipLibCheck": true
13
- },
14
- "include": ["src"],
15
- "exclude": ["node_modules", "dist"]
16
- }
package/tsup.config.ts DELETED
@@ -1,12 +0,0 @@
1
- import { defineConfig } from 'tsup'
2
-
3
- export default defineConfig({
4
- entry: {
5
- index: 'src/index.ts',
6
- zod: 'src/zod.ts',
7
- },
8
- format: ['esm', 'cjs'],
9
- dts: true,
10
- clean: true,
11
- splitting: false,
12
- })
package/vitest.config.ts DELETED
@@ -1,7 +0,0 @@
1
- import { defineConfig } from 'vitest/config'
2
-
3
- export default defineConfig({
4
- test: {
5
- include: ['tests/**/*.test.ts'],
6
- },
7
- })