Kaynağa Gözat

Inline scripts in packages (#842)

Loris Leiva 2 ay önce
ebeveyn
işleme
760dda5775
100 değiştirilmiş dosya ile 393 ekleme ve 380 silme
  1. 0 1
      .changeset/config.json
  2. 3 1
      eslint.config.mjs
  3. 3 4
      package.json
  4. 1 1
      packages/cli/.prettierignore
  5. 8 11
      packages/cli/package.json
  6. 1 1
      packages/cli/tsconfig.json
  7. 9 0
      packages/cli/tsup.config.ts
  8. 8 0
      packages/cli/vitest.config.mts
  9. 1 1
      packages/dynamic-codecs/.prettierignore
  10. 8 12
      packages/dynamic-codecs/package.json
  11. 1 1
      packages/dynamic-codecs/tsconfig.json
  12. 5 0
      packages/dynamic-codecs/tsup.config.ts
  13. 8 0
      packages/dynamic-codecs/vitest.config.mts
  14. 1 1
      packages/dynamic-parsers/.prettierignore
  15. 8 12
      packages/dynamic-parsers/package.json
  16. 1 1
      packages/dynamic-parsers/tsconfig.json
  17. 5 0
      packages/dynamic-parsers/tsup.config.ts
  18. 8 0
      packages/dynamic-parsers/vitest.config.mts
  19. 1 1
      packages/errors/.prettierignore
  20. 8 13
      packages/errors/package.json
  21. 1 1
      packages/errors/tsconfig.json
  22. 5 0
      packages/errors/tsup.config.ts
  23. 8 0
      packages/errors/vitest.config.mts
  24. 0 3
      packages/internals/README.md
  25. 0 15
      packages/internals/package.json
  26. 0 10
      packages/internals/scripts/build-src.mjs
  27. 0 6
      packages/internals/scripts/build-types.mjs
  28. 0 10
      packages/internals/scripts/lint.mjs
  29. 0 14
      packages/internals/scripts/test-treeshakability.mjs
  30. 0 6
      packages/internals/scripts/test-types.mjs
  31. 0 14
      packages/internals/scripts/test-unit.mjs
  32. 0 22
      packages/internals/tsconfig.base.json
  33. 0 8
      packages/internals/tsconfig.json
  34. 0 13
      packages/internals/tsup.config.cli.ts
  35. 0 12
      packages/internals/tsup.config.library.ts
  36. 0 11
      packages/internals/tsup.config.package.ts
  37. 0 3
      packages/internals/vitest.config.browser.mts
  38. 0 3
      packages/internals/vitest.config.node.mts
  39. 0 3
      packages/internals/vitest.config.react-native.mts
  40. 1 1
      packages/library/.prettierignore
  41. 8 13
      packages/library/package.json
  42. 1 1
      packages/library/tsconfig.json
  43. 9 0
      packages/library/tsup.config.ts
  44. 8 0
      packages/library/vitest.config.mts
  45. 1 1
      packages/node-types/.prettierignore
  46. 5 7
      packages/node-types/package.json
  47. 1 1
      packages/node-types/tsconfig.json
  48. 5 0
      packages/node-types/tsup.config.ts
  49. 1 1
      packages/nodes-from-anchor/.prettierignore
  50. 8 12
      packages/nodes-from-anchor/package.json
  51. 1 1
      packages/nodes-from-anchor/tsconfig.json
  52. 5 0
      packages/nodes-from-anchor/tsup.config.ts
  53. 8 0
      packages/nodes-from-anchor/vitest.config.mts
  54. 1 1
      packages/nodes/.prettierignore
  55. 8 12
      packages/nodes/package.json
  56. 1 1
      packages/nodes/tsconfig.json
  57. 5 0
      packages/nodes/tsup.config.ts
  58. 8 0
      packages/nodes/vitest.config.mts
  59. 1 1
      packages/renderers-core/.prettierignore
  60. 8 12
      packages/renderers-core/package.json
  61. 1 1
      packages/renderers-core/tsconfig.json
  62. 5 0
      packages/renderers-core/tsup.config.ts
  63. 8 0
      packages/renderers-core/vitest.config.mts
  64. 8 12
      packages/renderers-demo/package.json
  65. 1 1
      packages/renderers-demo/tsconfig.json
  66. 5 0
      packages/renderers-demo/tsup.config.ts
  67. 8 0
      packages/renderers-demo/vitest.config.mts
  68. 8 10
      packages/renderers-js-umi/package.json
  69. 1 1
      packages/renderers-js-umi/tsconfig.json
  70. 1 1
      packages/renderers-js-umi/tsup.config.ts
  71. 8 0
      packages/renderers-js-umi/vitest.config.mts
  72. 1 1
      packages/renderers-js/.prettierignore
  73. 8 12
      packages/renderers-js/package.json
  74. 1 1
      packages/renderers-js/tsconfig.json
  75. 5 0
      packages/renderers-js/tsup.config.ts
  76. 8 0
      packages/renderers-js/vitest.config.mts
  77. 8 10
      packages/renderers-rust/package.json
  78. 1 1
      packages/renderers-rust/tsconfig.json
  79. 8 0
      packages/renderers-rust/tsup.config.ts
  80. 8 0
      packages/renderers-rust/vitest.config.mts
  81. 5 7
      packages/renderers-vixen-parser/package.json
  82. 1 1
      packages/renderers-vixen-parser/tsconfig.json
  83. 8 0
      packages/renderers-vixen-parser/tsup.config.ts
  84. 8 0
      packages/renderers-vixen-parser/vitest.config.mts
  85. 1 1
      packages/renderers/.prettierignore
  86. 8 10
      packages/renderers/package.json
  87. 1 1
      packages/renderers/tsconfig.json
  88. 8 0
      packages/renderers/tsup.config.ts
  89. 8 0
      packages/renderers/vitest.config.mts
  90. 1 1
      packages/validators/.prettierignore
  91. 8 12
      packages/validators/package.json
  92. 1 1
      packages/validators/tsconfig.json
  93. 5 0
      packages/validators/tsup.config.ts
  94. 8 0
      packages/validators/vitest.config.mts
  95. 1 1
      packages/visitors-core/.prettierignore
  96. 8 12
      packages/visitors-core/package.json
  97. 1 1
      packages/visitors-core/tsconfig.json
  98. 5 0
      packages/visitors-core/tsup.config.ts
  99. 8 0
      packages/visitors-core/vitest.config.mts
  100. 1 1
      packages/visitors/.prettierignore

+ 0 - 1
.changeset/config.json

@@ -16,7 +16,6 @@
         ]
     ],
   "linked": [],
-  "ignore": ["@codama/internals"],
   "access": "public",
   "baseBranch": "main",
   "privatePackages": {

+ 3 - 1
eslint.config.mjs

@@ -3,8 +3,10 @@ import tseslint from 'typescript-eslint';
 
 export default tseslint.config([
     {
-        files: ['**/*.ts', '**/*.(c|m)?js'],
         ignores: ['**/dist/**', '**/e2e/**'],
+    },
+    {
+        files: ['**/*.ts', '**/*.(c|m)?js'],
         extends: [solanaConfig],
     },
     {

+ 3 - 4
package.json

@@ -4,14 +4,13 @@
     "scripts": {
         "build": "turbo run build --log-order grouped",
         "lint": "turbo run lint --log-order grouped",
-        "lint:fix": "turbo lint:fix --log-order grouped && pnpm prettier --log-level warn --ignore-unknown --write '{.,!packages}/*'",
+        "lint:fix": "turbo lint:fix --log-order grouped && pnpm prettier --ignore-unknown --write '{.,!packages}/*'",
         "test": "turbo run test --log-order grouped",
         "publish-packages": "pnpm build && changeset publish"
     },
     "devDependencies": {
         "@changesets/changelog-github": "^0.5.1",
         "@changesets/cli": "^2.29.7",
-        "@codama/internals": "workspace:*",
         "@eslint/js": "^9.35.0",
         "@eslint/json": "^0.13.2",
         "@solana/eslint-config-solana": "^5.0.0",
@@ -20,6 +19,7 @@
         "@typescript-eslint/eslint-plugin": "^8.43.0",
         "@typescript-eslint/parser": "^8.43.0",
         "agadoo": "^3.0.0",
+        "browserslist-to-esbuild": "^2.1.1",
         "eslint": "^9.35.0",
         "eslint-plugin-simple-import-sort": "^12.1.1",
         "eslint-plugin-sort-keys-fix": "^1.1.2",
@@ -30,8 +30,7 @@
         "turbo": "^2.5.6",
         "tsup": "^8.5.0",
         "typescript": "^5.9.2",
-        "vitest": "^3.2.4",
-        "zx": "^8.8.1"
+        "vitest": "^3.2.4"
     },
     "engines": {
         "node": ">=20.0.0"

+ 1 - 1
packages/cli/.prettierignore

@@ -1,5 +1,5 @@
 dist/
-e2e/
+test/e2e/
 test-ledger/
 target/
 CHANGELOG.md

+ 8 - 11
packages/cli/package.json

@@ -29,18 +29,15 @@
         "cli"
     ],
     "scripts": {
-        "build": "rimraf dist && pnpm build:src && pnpm build:cli && pnpm build:types",
-        "build:src": "zx ../../node_modules/@codama/internals/scripts/build-src.mjs node",
-        "build:cli": "zx ../../node_modules/@codama/internals/scripts/build-src.mjs cli",
-        "build:types": "zx ../../node_modules/@codama/internals/scripts/build-types.mjs",
-        "dev": "zx ../../node_modules/@codama/internals/scripts/test-unit.mjs node --watch",
-        "lint": "zx ../../node_modules/@codama/internals/scripts/lint.mjs",
-        "lint:fix": "zx ../../node_modules/@codama/internals/scripts/lint.mjs --fix",
-        "test": "pnpm test:types && pnpm test:treeshakability && pnpm test:node && pnpm test:exports",
+        "build": "rimraf dist && tsup && tsc -p ./tsconfig.declarations.json",
+        "dev": "vitest --project node",
+        "lint": "eslint . && prettier --check .",
+        "lint:fix": "eslint --fix . && prettier --write .",
+        "test": "pnpm test:types && pnpm test:treeshakability && pnpm test:unit && pnpm test:exports",
         "test:exports": "node test/exports/module.mjs && node test/exports/commonjs.cjs",
-        "test:node": "zx ../../node_modules/@codama/internals/scripts/test-unit.mjs node",
-        "test:treeshakability": "zx ../../node_modules/@codama/internals/scripts/test-treeshakability.mjs",
-        "test:types": "zx ../../node_modules/@codama/internals/scripts/test-types.mjs"
+        "test:treeshakability": "for file in dist/index.*.mjs; do agadoo $file; done",
+        "test:types": "tsc --noEmit",
+        "test:unit": "vitest run"
     },
     "dependencies": {
         "@codama/nodes": "workspace:*",

+ 1 - 1
packages/cli/tsconfig.json

@@ -4,6 +4,6 @@
         "module": "ESNext"
     },
     "display": "codama",
-    "extends": "../internals/tsconfig.base.json",
+    "extends": "../../tsconfig.json",
     "include": ["src", "test"]
 }

+ 9 - 0
packages/cli/tsup.config.ts

@@ -0,0 +1,9 @@
+import { defineConfig } from 'tsup';
+
+import { getBuildConfig, getCliBuildConfig } from '../../tsup.config.base';
+
+export default defineConfig([
+    getBuildConfig({ format: 'cjs', platform: 'node' }),
+    getBuildConfig({ format: 'esm', platform: 'node' }),
+    getCliBuildConfig(),
+]);

+ 8 - 0
packages/cli/vitest.config.mts

@@ -0,0 +1,8 @@
+import { defineConfig } from 'vitest/config';
+import { getVitestConfig } from '../../vitest.config.base.mjs';
+
+export default defineConfig({
+    test: {
+        projects: [getVitestConfig('node')],
+    },
+});

+ 1 - 1
packages/dynamic-codecs/.prettierignore

@@ -1,5 +1,5 @@
 dist/
-e2e/
+test/e2e/
 test-ledger/
 target/
 CHANGELOG.md

+ 8 - 12
packages/dynamic-codecs/package.json

@@ -36,18 +36,14 @@
         "codecs"
     ],
     "scripts": {
-        "build": "rimraf dist && pnpm build:src && pnpm build:types",
-        "build:src": "zx ../../node_modules/@codama/internals/scripts/build-src.mjs package",
-        "build:types": "zx ../../node_modules/@codama/internals/scripts/build-types.mjs",
-        "dev": "zx ../../node_modules/@codama/internals/scripts/test-unit.mjs node --watch",
-        "lint": "zx ../../node_modules/@codama/internals/scripts/lint.mjs",
-        "lint:fix": "zx ../../node_modules/@codama/internals/scripts/lint.mjs --fix",
-        "test": "pnpm test:types && pnpm test:treeshakability && pnpm test:browser && pnpm test:node && pnpm test:react-native",
-        "test:browser": "zx ../../node_modules/@codama/internals/scripts/test-unit.mjs browser",
-        "test:node": "zx ../../node_modules/@codama/internals/scripts/test-unit.mjs node",
-        "test:react-native": "zx ../../node_modules/@codama/internals/scripts/test-unit.mjs react-native",
-        "test:treeshakability": "zx ../../node_modules/@codama/internals/scripts/test-treeshakability.mjs",
-        "test:types": "zx ../../node_modules/@codama/internals/scripts/test-types.mjs"
+        "build": "rimraf dist && tsup && tsc -p ./tsconfig.declarations.json",
+        "dev": "vitest --project node",
+        "lint": "eslint . && prettier --check .",
+        "lint:fix": "eslint --fix . && prettier --write .",
+        "test": "pnpm test:types && pnpm test:treeshakability && pnpm test:unit",
+        "test:treeshakability": "for file in dist/index.*.mjs; do agadoo $file; done",
+        "test:types": "tsc --noEmit",
+        "test:unit": "vitest run"
     },
     "dependencies": {
         "@codama/errors": "workspace:*",

+ 1 - 1
packages/dynamic-codecs/tsconfig.json

@@ -2,6 +2,6 @@
     "$schema": "https://json.schemastore.org/tsconfig",
     "compilerOptions": { "lib": [] },
     "display": "@codama/dynamic-codecs",
-    "extends": "../internals/tsconfig.base.json",
+    "extends": "../../tsconfig.json",
     "include": ["src", "test"]
 }

+ 5 - 0
packages/dynamic-codecs/tsup.config.ts

@@ -0,0 +1,5 @@
+import { defineConfig } from 'tsup';
+
+import { getPackageBuildConfigs } from '../../tsup.config.base';
+
+export default defineConfig(getPackageBuildConfigs());

+ 8 - 0
packages/dynamic-codecs/vitest.config.mts

@@ -0,0 +1,8 @@
+import { defineConfig } from 'vitest/config';
+import { getVitestConfig } from '../../vitest.config.base.mjs';
+
+export default defineConfig({
+    test: {
+        projects: [getVitestConfig('browser'), getVitestConfig('node'), getVitestConfig('react-native')],
+    },
+});

+ 1 - 1
packages/dynamic-parsers/.prettierignore

@@ -1,5 +1,5 @@
 dist/
-e2e/
+test/e2e/
 test-ledger/
 target/
 CHANGELOG.md

+ 8 - 12
packages/dynamic-parsers/package.json

@@ -36,18 +36,14 @@
         "parsers"
     ],
     "scripts": {
-        "build": "rimraf dist && pnpm build:src && pnpm build:types",
-        "build:src": "zx ../../node_modules/@codama/internals/scripts/build-src.mjs package",
-        "build:types": "zx ../../node_modules/@codama/internals/scripts/build-types.mjs",
-        "dev": "zx ../../node_modules/@codama/internals/scripts/test-unit.mjs node --watch",
-        "lint": "zx ../../node_modules/@codama/internals/scripts/lint.mjs",
-        "lint:fix": "zx ../../node_modules/@codama/internals/scripts/lint.mjs --fix",
-        "test": "pnpm test:types && pnpm test:treeshakability && pnpm test:browser && pnpm test:node && pnpm test:react-native",
-        "test:browser": "zx ../../node_modules/@codama/internals/scripts/test-unit.mjs browser",
-        "test:node": "zx ../../node_modules/@codama/internals/scripts/test-unit.mjs node",
-        "test:react-native": "zx ../../node_modules/@codama/internals/scripts/test-unit.mjs react-native",
-        "test:treeshakability": "zx ../../node_modules/@codama/internals/scripts/test-treeshakability.mjs",
-        "test:types": "zx ../../node_modules/@codama/internals/scripts/test-types.mjs"
+        "build": "rimraf dist && tsup && tsc -p ./tsconfig.declarations.json",
+        "dev": "vitest --project node",
+        "lint": "eslint . && prettier --check .",
+        "lint:fix": "eslint --fix . && prettier --write .",
+        "test": "pnpm test:types && pnpm test:treeshakability && pnpm test:unit",
+        "test:treeshakability": "for file in dist/index.*.mjs; do agadoo $file; done",
+        "test:types": "tsc --noEmit",
+        "test:unit": "vitest run"
     },
     "dependencies": {
         "@codama/dynamic-codecs": "workspace:*",

+ 1 - 1
packages/dynamic-parsers/tsconfig.json

@@ -2,6 +2,6 @@
     "$schema": "https://json.schemastore.org/tsconfig",
     "compilerOptions": { "lib": [] },
     "display": "@codama/dynamic-parsers",
-    "extends": "../internals/tsconfig.base.json",
+    "extends": "../../tsconfig.json",
     "include": ["src", "test"]
 }

+ 5 - 0
packages/dynamic-parsers/tsup.config.ts

@@ -0,0 +1,5 @@
+import { defineConfig } from 'tsup';
+
+import { getPackageBuildConfigs } from '../../tsup.config.base';
+
+export default defineConfig(getPackageBuildConfigs());

+ 8 - 0
packages/dynamic-parsers/vitest.config.mts

@@ -0,0 +1,8 @@
+import { defineConfig } from 'vitest/config';
+import { getVitestConfig } from '../../vitest.config.base.mjs';
+
+export default defineConfig({
+    test: {
+        projects: [getVitestConfig('browser'), getVitestConfig('node'), getVitestConfig('react-native')],
+    },
+});

+ 1 - 1
packages/errors/.prettierignore

@@ -1,5 +1,5 @@
 dist/
-e2e/
+test/e2e/
 test-ledger/
 target/
 CHANGELOG.md

+ 8 - 13
packages/errors/package.json

@@ -38,19 +38,14 @@
         "specifications"
     ],
     "scripts": {
-        "build": "rimraf dist && pnpm build:src && pnpm build:cli && pnpm build:types",
-        "build:src": "zx ../../node_modules/@codama/internals/scripts/build-src.mjs package",
-        "build:cli": "zx ../../node_modules/@codama/internals/scripts/build-src.mjs cli",
-        "build:types": "zx ../../node_modules/@codama/internals/scripts/build-types.mjs",
-        "dev": "zx ../../node_modules/@codama/internals/scripts/test-unit.mjs node --watch",
-        "lint": "zx ../../node_modules/@codama/internals/scripts/lint.mjs",
-        "lint:fix": "zx ../../node_modules/@codama/internals/scripts/lint.mjs --fix",
-        "test": "pnpm test:types && pnpm test:treeshakability && pnpm test:browser && pnpm test:node && pnpm test:react-native",
-        "test:browser": "zx ../../node_modules/@codama/internals/scripts/test-unit.mjs browser",
-        "test:node": "zx ../../node_modules/@codama/internals/scripts/test-unit.mjs node",
-        "test:react-native": "zx ../../node_modules/@codama/internals/scripts/test-unit.mjs react-native",
-        "test:treeshakability": "zx ../../node_modules/@codama/internals/scripts/test-treeshakability.mjs",
-        "test:types": "zx ../../node_modules/@codama/internals/scripts/test-types.mjs"
+        "build": "rimraf dist && tsup && tsc -p ./tsconfig.declarations.json",
+        "dev": "vitest --project node",
+        "lint": "eslint . && prettier --check .",
+        "lint:fix": "eslint --fix . && prettier --write .",
+        "test": "pnpm test:types && pnpm test:treeshakability && pnpm test:unit",
+        "test:treeshakability": "for file in dist/index.*.mjs; do agadoo $file; done",
+        "test:types": "tsc --noEmit",
+        "test:unit": "vitest run"
     },
     "dependencies": {
         "@codama/node-types": "workspace:*",

+ 1 - 1
packages/errors/tsconfig.json

@@ -5,6 +5,6 @@
         "resolveJsonModule": true
     },
     "display": "@codama/errors",
-    "extends": "../internals/tsconfig.base.json",
+    "extends": "../../tsconfig.json",
     "include": ["src", "test"]
 }

+ 5 - 0
packages/errors/tsup.config.ts

@@ -0,0 +1,5 @@
+import { defineConfig } from 'tsup';
+
+import { getCliBuildConfig, getPackageBuildConfigs } from '../../tsup.config.base';
+
+export default defineConfig([...getPackageBuildConfigs(), getCliBuildConfig()]);

+ 8 - 0
packages/errors/vitest.config.mts

@@ -0,0 +1,8 @@
+import { defineConfig } from 'vitest/config';
+import { getVitestConfig } from '../../vitest.config.base.mjs';
+
+export default defineConfig({
+    test: {
+        projects: [getVitestConfig('browser'), getVitestConfig('node'), getVitestConfig('react-native')],
+    },
+});

+ 0 - 3
packages/internals/README.md

@@ -1,3 +0,0 @@
-# Codama ➤ Internals
-
-_This package is not exported and is only used for internal purposes._

+ 0 - 15
packages/internals/package.json

@@ -1,15 +0,0 @@
-{
-    "name": "@codama/internals",
-    "version": "0.0.0",
-    "private": true,
-    "files": [
-        "scripts",
-        "env-shim.ts",
-        "tsconfig.*",
-        "tsup.config.*",
-        "vitest.config.*"
-    ],
-    "devDependencies": {
-        "browserslist-to-esbuild": "^2.1.1"
-    }
-}

+ 0 - 10
packages/internals/scripts/build-src.mjs

@@ -1,10 +0,0 @@
-#!/usr/bin/env zx
-import { $, argv } from 'zx';
-
-// Build the source code using the provided build type.
-// - `library` for the main library build which includes a minified iife build.
-// - `package` for sub-package builds.
-
-$.stdio = 'inherit';
-const flags = ['--config', `internals/tsup.config.${argv._[0]}.ts`];
-await $`tsup ${flags}`;

+ 0 - 6
packages/internals/scripts/build-types.mjs

@@ -1,6 +0,0 @@
-#!/usr/bin/env zx
-import { $ } from 'zx';
-
-// Build the types only.
-$.stdio = 'inherit';
-await $`tsc -p ./tsconfig.declarations.json`;

+ 0 - 10
packages/internals/scripts/lint.mjs

@@ -1,10 +0,0 @@
-#!/usr/bin/env zx
-import { $, argv } from 'zx';
-
-// Lint and format the code.
-$.stdio = 'inherit';
-if (argv.fix) {
-    await $`pnpm eslint --fix . && pnpm prettier --log-level warn --ignore-unknown --write ./*`;
-} else {
-    await $`pnpm eslint . && pnpm prettier --check .`;
-}

+ 0 - 14
packages/internals/scripts/test-treeshakability.mjs

@@ -1,14 +0,0 @@
-#!/usr/bin/env zx
-import { $ } from 'zx';
-
-// Ensure the code is tree-shakable.
-$.stdio = 'inherit';
-if ((await $`[[ -f dist/index.browser.mjs ]]`.exitCode) == 0) {
-    await $`agadoo dist/index.browser.mjs`;
-}
-if ((await $`[[ -f dist/index.node.mjs ]]`.exitCode) == 0) {
-    await $`agadoo dist/index.node.mjs`;
-}
-if ((await $`[[ -f dist/index.react-native.mjs ]]`.exitCode) == 0) {
-    await $`agadoo dist/index.react-native.mjs`;
-}

+ 0 - 6
packages/internals/scripts/test-types.mjs

@@ -1,6 +0,0 @@
-#!/usr/bin/env zx
-import { $ } from 'zx';
-
-// Ensure the code type checks.
-$.stdio = 'inherit';
-await $`tsc --noEmit`;

+ 0 - 14
packages/internals/scripts/test-unit.mjs

@@ -1,14 +0,0 @@
-#!/usr/bin/env zx
-import { $, argv } from 'zx';
-
-$.stdio = 'inherit';
-const platform = argv._[0];
-const watch = argv.watch;
-
-const testArgs = ['--config', `../../node_modules/@codama/internals/vitest.config.${platform}.mts`];
-
-if (watch) {
-    await $`vitest ${testArgs}`;
-} else {
-    await $`vitest run ${testArgs}`;
-}

+ 0 - 22
packages/internals/tsconfig.base.json

@@ -1,22 +0,0 @@
-{
-    "$schema": "https://json.schemastore.org/tsconfig",
-    "display": "Default",
-    "compilerOptions": {
-        "composite": false,
-        "declaration": true,
-        "declarationMap": true,
-        "esModuleInterop": true,
-        "forceConsistentCasingInFileNames": true,
-        "inlineSources": false,
-        "isolatedModules": true,
-        "moduleResolution": "node",
-        "noFallthroughCasesInSwitch": true,
-        "noUnusedLocals": true,
-        "noUnusedParameters": true,
-        "preserveWatchOutput": true,
-        "skipLibCheck": true,
-        "strict": true,
-        "target": "ESNext"
-    },
-    "exclude": ["node_modules"]
-}

+ 0 - 8
packages/internals/tsconfig.json

@@ -1,8 +0,0 @@
-{
-    "$schema": "https://json.schemastore.org/tsconfig",
-    "compilerOptions": {
-        "types": ["node"]
-    },
-    "display": "Build Scripts",
-    "extends": "./tsconfig.base.json"
-}

+ 0 - 13
packages/internals/tsup.config.cli.ts

@@ -1,13 +0,0 @@
-import { defineConfig } from 'tsup';
-
-import { getBuildConfig } from './tsup.config.base';
-
-export default defineConfig([
-    {
-        ...getBuildConfig({ format: 'cjs', platform: 'node' }),
-        entry: { cli: './src/cli/index.ts' },
-        outExtension() {
-            return { js: `.cjs` };
-        },
-    },
-]);

+ 0 - 12
packages/internals/tsup.config.library.ts

@@ -1,12 +0,0 @@
-import { defineConfig } from 'tsup';
-
-import { getBuildConfig } from './tsup.config.base';
-
-export default defineConfig([
-    getBuildConfig({ format: 'cjs', platform: 'node' }),
-    getBuildConfig({ format: 'esm', platform: 'node' }),
-    getBuildConfig({ format: 'cjs', platform: 'browser' }),
-    getBuildConfig({ format: 'esm', platform: 'browser' }),
-    getBuildConfig({ format: 'esm', platform: 'react-native' }),
-    getBuildConfig({ format: 'iife', platform: 'browser' }),
-]);

+ 0 - 11
packages/internals/tsup.config.package.ts

@@ -1,11 +0,0 @@
-import { defineConfig } from 'tsup';
-
-import { getBuildConfig } from './tsup.config.base';
-
-export default defineConfig([
-    getBuildConfig({ format: 'cjs', platform: 'node' }),
-    getBuildConfig({ format: 'esm', platform: 'node' }),
-    getBuildConfig({ format: 'cjs', platform: 'browser' }),
-    getBuildConfig({ format: 'esm', platform: 'browser' }),
-    getBuildConfig({ format: 'esm', platform: 'react-native' }),
-]);

+ 0 - 3
packages/internals/vitest.config.browser.mts

@@ -1,3 +0,0 @@
-import { getVitestConfig } from './vitest.config.base.mjs';
-
-export default getVitestConfig('browser');

+ 0 - 3
packages/internals/vitest.config.node.mts

@@ -1,3 +0,0 @@
-import { getVitestConfig } from './vitest.config.base.mjs';
-
-export default getVitestConfig('node');

+ 0 - 3
packages/internals/vitest.config.react-native.mts

@@ -1,3 +0,0 @@
-import { getVitestConfig } from './vitest.config.base.mjs';
-
-export default getVitestConfig('react-native');

+ 1 - 1
packages/library/.prettierignore

@@ -1,5 +1,5 @@
 dist/
-e2e/
+test/e2e/
 test-ledger/
 target/
 CHANGELOG.md

+ 8 - 13
packages/library/package.json

@@ -42,19 +42,14 @@
         "code generation"
     ],
     "scripts": {
-        "build": "rimraf dist && pnpm build:src && pnpm build:cli && pnpm build:types",
-        "build:src": "zx ../../node_modules/@codama/internals/scripts/build-src.mjs library",
-        "build:cli": "zx ../../node_modules/@codama/internals/scripts/build-src.mjs cli",
-        "build:types": "zx ../../node_modules/@codama/internals/scripts/build-types.mjs",
-        "dev": "zx ../../node_modules/@codama/internals/scripts/test-unit.mjs node --watch",
-        "lint": "zx ../../node_modules/@codama/internals/scripts/lint.mjs",
-        "lint:fix": "zx ../../node_modules/@codama/internals/scripts/lint.mjs --fix",
-        "test": "pnpm test:types && pnpm test:treeshakability && pnpm test:browser && pnpm test:node && pnpm test:react-native",
-        "test:browser": "zx ../../node_modules/@codama/internals/scripts/test-unit.mjs browser",
-        "test:node": "zx ../../node_modules/@codama/internals/scripts/test-unit.mjs node",
-        "test:react-native": "zx ../../node_modules/@codama/internals/scripts/test-unit.mjs react-native",
-        "test:treeshakability": "zx ../../node_modules/@codama/internals/scripts/test-treeshakability.mjs",
-        "test:types": "zx ../../node_modules/@codama/internals/scripts/test-types.mjs"
+        "build": "rimraf dist && tsup && tsc -p ./tsconfig.declarations.json",
+        "dev": "vitest --project node",
+        "lint": "eslint . && prettier --check .",
+        "lint:fix": "eslint --fix . && prettier --write .",
+        "test": "pnpm test:types && pnpm test:treeshakability && pnpm test:unit",
+        "test:treeshakability": "for file in dist/index.*.mjs; do agadoo $file; done",
+        "test:types": "tsc --noEmit",
+        "test:unit": "vitest run"
     },
     "dependencies": {
         "@codama/cli": "workspace:*",

+ 1 - 1
packages/library/tsconfig.json

@@ -5,6 +5,6 @@
         "resolveJsonModule": true
     },
     "display": "codama",
-    "extends": "../internals/tsconfig.base.json",
+    "extends": "../../tsconfig.json",
     "include": ["src", "test"]
 }

+ 9 - 0
packages/library/tsup.config.ts

@@ -0,0 +1,9 @@
+import { defineConfig } from 'tsup';
+
+import { getBuildConfig, getCliBuildConfig, getPackageBuildConfigs } from '../../tsup.config.base';
+
+export default defineConfig([
+    ...getPackageBuildConfigs(),
+    getBuildConfig({ format: 'iife', platform: 'browser' }),
+    getCliBuildConfig(),
+]);

+ 8 - 0
packages/library/vitest.config.mts

@@ -0,0 +1,8 @@
+import { defineConfig } from 'vitest/config';
+import { getVitestConfig } from '../../vitest.config.base.mjs';
+
+export default defineConfig({
+    test: {
+        projects: [getVitestConfig('browser'), getVitestConfig('node'), getVitestConfig('react-native')],
+    },
+});

+ 1 - 1
packages/node-types/.prettierignore

@@ -1,5 +1,5 @@
 dist/
-e2e/
+test/e2e/
 test-ledger/
 target/
 CHANGELOG.md

+ 5 - 7
packages/node-types/package.json

@@ -35,14 +35,12 @@
         "specifications"
     ],
     "scripts": {
-        "build": "rimraf dist && pnpm build:src && pnpm build:types",
-        "build:src": "zx ../../node_modules/@codama/internals/scripts/build-src.mjs package",
-        "build:types": "zx ../../node_modules/@codama/internals/scripts/build-types.mjs",
-        "lint": "zx ../../node_modules/@codama/internals/scripts/lint.mjs",
-        "lint:fix": "zx ../../node_modules/@codama/internals/scripts/lint.mjs --fix",
+        "build": "rimraf dist && tsup && tsc -p ./tsconfig.declarations.json",
+        "lint": "eslint . && prettier --check .",
+        "lint:fix": "eslint --fix . && prettier --write .",
         "test": "pnpm test:types && pnpm test:treeshakability",
-        "test:treeshakability": "zx ../../node_modules/@codama/internals/scripts/test-treeshakability.mjs",
-        "test:types": "zx ../../node_modules/@codama/internals/scripts/test-types.mjs"
+        "test:treeshakability": "for file in dist/index.*.mjs; do agadoo $file; done",
+        "test:types": "tsc --noEmit"
     },
     "license": "MIT",
     "repository": {

+ 1 - 1
packages/node-types/tsconfig.json

@@ -2,6 +2,6 @@
     "$schema": "https://json.schemastore.org/tsconfig",
     "compilerOptions": { "lib": [] },
     "display": "@codama/node-types",
-    "extends": "../internals/tsconfig.base.json",
+    "extends": "../../tsconfig.json",
     "include": ["src", "test"]
 }

+ 5 - 0
packages/node-types/tsup.config.ts

@@ -0,0 +1,5 @@
+import { defineConfig } from 'tsup';
+
+import { getPackageBuildConfigs } from '../../tsup.config.base';
+
+export default defineConfig(getPackageBuildConfigs());

+ 1 - 1
packages/nodes-from-anchor/.prettierignore

@@ -1,5 +1,5 @@
 dist/
-e2e/
+test/e2e/
 test-ledger/
 target/
 CHANGELOG.md

+ 8 - 12
packages/nodes-from-anchor/package.json

@@ -35,18 +35,14 @@
         "specifications"
     ],
     "scripts": {
-        "build": "rimraf dist && pnpm build:src && pnpm build:types",
-        "build:src": "zx ../../node_modules/@codama/internals/scripts/build-src.mjs package",
-        "build:types": "zx ../../node_modules/@codama/internals/scripts/build-types.mjs",
-        "dev": "zx ../../node_modules/@codama/internals/scripts/test-unit.mjs node --watch",
-        "lint": "zx ../../node_modules/@codama/internals/scripts/lint.mjs",
-        "lint:fix": "zx ../../node_modules/@codama/internals/scripts/lint.mjs --fix",
-        "test": "pnpm test:types && pnpm test:treeshakability && pnpm test:browser && pnpm test:node && pnpm test:react-native",
-        "test:browser": "zx ../../node_modules/@codama/internals/scripts/test-unit.mjs browser",
-        "test:node": "zx ../../node_modules/@codama/internals/scripts/test-unit.mjs node",
-        "test:react-native": "zx ../../node_modules/@codama/internals/scripts/test-unit.mjs react-native",
-        "test:treeshakability": "zx ../../node_modules/@codama/internals/scripts/test-treeshakability.mjs",
-        "test:types": "zx ../../node_modules/@codama/internals/scripts/test-types.mjs"
+        "build": "rimraf dist && tsup && tsc -p ./tsconfig.declarations.json",
+        "dev": "vitest --project node",
+        "lint": "eslint . && prettier --check .",
+        "lint:fix": "eslint --fix . && prettier --write .",
+        "test": "pnpm test:types && pnpm test:treeshakability && pnpm test:unit",
+        "test:treeshakability": "for file in dist/index.*.mjs; do agadoo $file; done",
+        "test:types": "tsc --noEmit",
+        "test:unit": "vitest run"
     },
     "dependencies": {
         "@codama/errors": "workspace:*",

+ 1 - 1
packages/nodes-from-anchor/tsconfig.json

@@ -2,6 +2,6 @@
     "$schema": "https://json.schemastore.org/tsconfig",
     "compilerOptions": { "lib": [] },
     "display": "@codama/nodes-from-anchor",
-    "extends": "../internals/tsconfig.base.json",
+    "extends": "../../tsconfig.json",
     "include": ["src", "test"]
 }

+ 5 - 0
packages/nodes-from-anchor/tsup.config.ts

@@ -0,0 +1,5 @@
+import { defineConfig } from 'tsup';
+
+import { getPackageBuildConfigs } from '../../tsup.config.base';
+
+export default defineConfig(getPackageBuildConfigs());

+ 8 - 0
packages/nodes-from-anchor/vitest.config.mts

@@ -0,0 +1,8 @@
+import { defineConfig } from 'vitest/config';
+import { getVitestConfig } from '../../vitest.config.base.mjs';
+
+export default defineConfig({
+    test: {
+        projects: [getVitestConfig('browser'), getVitestConfig('node'), getVitestConfig('react-native')],
+    },
+});

+ 1 - 1
packages/nodes/.prettierignore

@@ -1,5 +1,5 @@
 dist/
-e2e/
+test/e2e/
 test-ledger/
 target/
 CHANGELOG.md

+ 8 - 12
packages/nodes/package.json

@@ -35,18 +35,14 @@
         "specifications"
     ],
     "scripts": {
-        "build": "rimraf dist && pnpm build:src && pnpm build:types",
-        "build:src": "zx ../../node_modules/@codama/internals/scripts/build-src.mjs package",
-        "build:types": "zx ../../node_modules/@codama/internals/scripts/build-types.mjs",
-        "dev": "zx ../../node_modules/@codama/internals/scripts/test-unit.mjs node --watch",
-        "lint": "zx ../../node_modules/@codama/internals/scripts/lint.mjs",
-        "lint:fix": "zx ../../node_modules/@codama/internals/scripts/lint.mjs --fix",
-        "test": "pnpm test:types && pnpm test:treeshakability && pnpm test:browser && pnpm test:node && pnpm test:react-native",
-        "test:browser": "zx ../../node_modules/@codama/internals/scripts/test-unit.mjs browser",
-        "test:node": "zx ../../node_modules/@codama/internals/scripts/test-unit.mjs node",
-        "test:react-native": "zx ../../node_modules/@codama/internals/scripts/test-unit.mjs react-native",
-        "test:treeshakability": "zx ../../node_modules/@codama/internals/scripts/test-treeshakability.mjs",
-        "test:types": "zx ../../node_modules/@codama/internals/scripts/test-types.mjs"
+        "build": "rimraf dist && tsup && tsc -p ./tsconfig.declarations.json",
+        "dev": "vitest --project node",
+        "lint": "eslint . && prettier --check .",
+        "lint:fix": "eslint --fix . && prettier --write .",
+        "test": "pnpm test:types && pnpm test:treeshakability && pnpm test:unit",
+        "test:treeshakability": "for file in dist/index.*.mjs; do agadoo $file; done",
+        "test:types": "tsc --noEmit",
+        "test:unit": "vitest run"
     },
     "dependencies": {
         "@codama/errors": "workspace:*",

+ 1 - 1
packages/nodes/tsconfig.json

@@ -2,6 +2,6 @@
     "$schema": "https://json.schemastore.org/tsconfig",
     "compilerOptions": { "lib": [] },
     "display": "@codama/nodes",
-    "extends": "../internals/tsconfig.base.json",
+    "extends": "../../tsconfig.json",
     "include": ["src", "test"]
 }

+ 5 - 0
packages/nodes/tsup.config.ts

@@ -0,0 +1,5 @@
+import { defineConfig } from 'tsup';
+
+import { getPackageBuildConfigs } from '../../tsup.config.base';
+
+export default defineConfig(getPackageBuildConfigs());

+ 8 - 0
packages/nodes/vitest.config.mts

@@ -0,0 +1,8 @@
+import { defineConfig } from 'vitest/config';
+import { getVitestConfig } from '../../vitest.config.base.mjs';
+
+export default defineConfig({
+    test: {
+        projects: [getVitestConfig('browser'), getVitestConfig('node'), getVitestConfig('react-native')],
+    },
+});

+ 1 - 1
packages/renderers-core/.prettierignore

@@ -1,5 +1,5 @@
 dist/
-e2e/
+test/e2e/
 test-ledger/
 target/
 CHANGELOG.md

+ 8 - 12
packages/renderers-core/package.json

@@ -35,18 +35,14 @@
         "visitors"
     ],
     "scripts": {
-        "build": "rimraf dist && pnpm build:src && pnpm build:types",
-        "build:src": "zx ../../node_modules/@codama/internals/scripts/build-src.mjs package",
-        "build:types": "zx ../../node_modules/@codama/internals/scripts/build-types.mjs",
-        "dev": "zx ../../node_modules/@codama/internals/scripts/test-unit.mjs node --watch",
-        "lint": "zx ../../node_modules/@codama/internals/scripts/lint.mjs",
-        "lint:fix": "zx ../../node_modules/@codama/internals/scripts/lint.mjs --fix",
-        "test": "pnpm test:types && pnpm test:treeshakability && pnpm test:browser && pnpm test:node && pnpm test:react-native",
-        "test:browser": "zx ../../node_modules/@codama/internals/scripts/test-unit.mjs browser",
-        "test:node": "zx ../../node_modules/@codama/internals/scripts/test-unit.mjs node",
-        "test:react-native": "zx ../../node_modules/@codama/internals/scripts/test-unit.mjs react-native",
-        "test:treeshakability": "zx ../../node_modules/@codama/internals/scripts/test-treeshakability.mjs",
-        "test:types": "zx ../../node_modules/@codama/internals/scripts/test-types.mjs"
+        "build": "rimraf dist && tsup && tsc -p ./tsconfig.declarations.json",
+        "dev": "vitest --project node",
+        "lint": "eslint . && prettier --check .",
+        "lint:fix": "eslint --fix . && prettier --write .",
+        "test": "pnpm test:types && pnpm test:treeshakability && pnpm test:unit",
+        "test:treeshakability": "for file in dist/index.*.mjs; do agadoo $file; done",
+        "test:types": "tsc --noEmit",
+        "test:unit": "vitest run"
     },
     "dependencies": {
         "@codama/errors": "workspace:*",

+ 1 - 1
packages/renderers-core/tsconfig.json

@@ -2,6 +2,6 @@
     "$schema": "https://json.schemastore.org/tsconfig",
     "compilerOptions": { "lib": [] },
     "display": "@codama/renderers-core",
-    "extends": "../internals/tsconfig.base.json",
+    "extends": "../../tsconfig.json",
     "include": ["src", "test"]
 }

+ 5 - 0
packages/renderers-core/tsup.config.ts

@@ -0,0 +1,5 @@
+import { defineConfig } from 'tsup';
+
+import { getPackageBuildConfigs } from '../../tsup.config.base';
+
+export default defineConfig(getPackageBuildConfigs());

+ 8 - 0
packages/renderers-core/vitest.config.mts

@@ -0,0 +1,8 @@
+import { defineConfig } from 'vitest/config';
+import { getVitestConfig } from '../../vitest.config.base.mjs';
+
+export default defineConfig({
+    test: {
+        projects: [getVitestConfig('browser'), getVitestConfig('node'), getVitestConfig('react-native')],
+    },
+});

+ 8 - 12
packages/renderers-demo/package.json

@@ -36,20 +36,16 @@
         "demo"
     ],
     "scripts": {
-        "build": "rimraf dist && pnpm build:src && pnpm build:types",
-        "build:src": "zx ../../node_modules/@codama/internals/scripts/build-src.mjs package",
-        "build:types": "zx ../../node_modules/@codama/internals/scripts/build-types.mjs",
-        "dev": "zx ../../node_modules/@codama/internals/scripts/test-unit.mjs node --watch",
-        "lint": "zx ../../node_modules/@codama/internals/scripts/lint.mjs",
-        "lint:fix": "zx ../../node_modules/@codama/internals/scripts/lint.mjs --fix",
-        "test": "pnpm test:types && pnpm test:treeshakability && pnpm test:browser && pnpm test:node && pnpm test:react-native && pnpm test:e2e && pnpm test:exports",
-        "test:browser": "zx ../../node_modules/@codama/internals/scripts/test-unit.mjs browser",
+        "build": "rimraf dist && tsup && tsc -p ./tsconfig.declarations.json",
+        "dev": "vitest --project node",
+        "lint": "eslint . && prettier --check .",
+        "lint:fix": "eslint --fix . && prettier --write .",
+        "test": "pnpm test:types && pnpm test:treeshakability && pnpm test:unit && pnpm test:e2e && pnpm test:exports",
         "test:e2e": "./test/e2e/test.sh",
         "test:exports": "node ./test/exports/module.mjs && node ./test/exports/commonjs.cjs",
-        "test:node": "zx ../../node_modules/@codama/internals/scripts/test-unit.mjs node",
-        "test:react-native": "zx ../../node_modules/@codama/internals/scripts/test-unit.mjs react-native",
-        "test:treeshakability": "zx ../../node_modules/@codama/internals/scripts/test-treeshakability.mjs",
-        "test:types": "zx ../../node_modules/@codama/internals/scripts/test-types.mjs"
+        "test:treeshakability": "for file in dist/index.*.mjs; do agadoo $file; done",
+        "test:types": "tsc --noEmit",
+        "test:unit": "vitest run"
     },
     "dependencies": {
         "@codama/errors": "workspace:*",

+ 1 - 1
packages/renderers-demo/tsconfig.json

@@ -2,6 +2,6 @@
     "$schema": "https://json.schemastore.org/tsconfig",
     "compilerOptions": { "lib": [] },
     "display": "@codama/renderers-demo",
-    "extends": "../internals/tsconfig.base.json",
+    "extends": "../../tsconfig.json",
     "include": ["src", "test"]
 }

+ 5 - 0
packages/renderers-demo/tsup.config.ts

@@ -0,0 +1,5 @@
+import { defineConfig } from 'tsup';
+
+import { getPackageBuildConfigs } from '../../tsup.config.base';
+
+export default defineConfig(getPackageBuildConfigs());

+ 8 - 0
packages/renderers-demo/vitest.config.mts

@@ -0,0 +1,8 @@
+import { defineConfig } from 'vitest/config';
+import { getVitestConfig } from '../../vitest.config.base.mjs';
+
+export default defineConfig({
+    test: {
+        projects: [getVitestConfig('browser'), getVitestConfig('node'), getVitestConfig('react-native')],
+    },
+});

+ 8 - 10
packages/renderers-js-umi/package.json

@@ -29,18 +29,16 @@
         "client"
     ],
     "scripts": {
-        "build": "rimraf dist && pnpm build:src && pnpm build:types",
-        "build:src": "zx ../../node_modules/@codama/internals/scripts/build-src.mjs node",
-        "build:types": "zx ../../node_modules/@codama/internals/scripts/build-types.mjs",
-        "dev": "zx ../../node_modules/@codama/internals/scripts/test-unit.mjs node --watch",
-        "lint": "zx ../../node_modules/@codama/internals/scripts/lint.mjs",
-        "lint:fix": "zx ../../node_modules/@codama/internals/scripts/lint.mjs --fix",
-        "test": "pnpm test:types && pnpm test:treeshakability && pnpm test:node && pnpm test:e2e && pnpm test:exports",
+        "build": "rimraf dist && tsup && tsc -p ./tsconfig.declarations.json",
+        "dev": "vitest --project node",
+        "lint": "eslint . && prettier --check .",
+        "lint:fix": "eslint --fix . && prettier --write .",
+        "test": "pnpm test:types && pnpm test:treeshakability && pnpm test:unit && pnpm test:e2e && pnpm test:exports",
         "test:e2e": "./e2e/test.sh",
         "test:exports": "node ./test/exports/module.mjs && node ./test/exports/commonjs.cjs",
-        "test:node": "zx ../../node_modules/@codama/internals/scripts/test-unit.mjs node",
-        "test:treeshakability": "zx ../../node_modules/@codama/internals/scripts/test-treeshakability.mjs",
-        "test:types": "zx ../../node_modules/@codama/internals/scripts/test-types.mjs"
+        "test:treeshakability": "for file in dist/index.*.mjs; do agadoo $file; done",
+        "test:types": "tsc --noEmit",
+        "test:unit": "vitest run"
     },
     "dependencies": {
         "@codama/errors": "workspace:*",

+ 1 - 1
packages/renderers-js-umi/tsconfig.json

@@ -2,6 +2,6 @@
     "$schema": "https://json.schemastore.org/tsconfig",
     "compilerOptions": { "lib": [] },
     "display": "@codama/renderers-js-umi",
-    "extends": "../internals/tsconfig.base.json",
+    "extends": "../../tsconfig.json",
     "include": ["src", "test"]
 }

+ 1 - 1
packages/internals/tsup.config.node.ts → packages/renderers-js-umi/tsup.config.ts

@@ -1,6 +1,6 @@
 import { defineConfig } from 'tsup';
 
-import { getBuildConfig } from './tsup.config.base';
+import { getBuildConfig } from '../../tsup.config.base';
 
 export default defineConfig([
     getBuildConfig({ format: 'cjs', platform: 'node' }),

+ 8 - 0
packages/renderers-js-umi/vitest.config.mts

@@ -0,0 +1,8 @@
+import { defineConfig } from 'vitest/config';
+import { getVitestConfig } from '../../vitest.config.base.mjs';
+
+export default defineConfig({
+    test: {
+        projects: [getVitestConfig('node')],
+    },
+});

+ 1 - 1
packages/renderers-js/.prettierignore

@@ -1,5 +1,5 @@
 dist/
-e2e/
+test/e2e/
 test-ledger/
 target/
 CHANGELOG.md

+ 8 - 12
packages/renderers-js/package.json

@@ -37,20 +37,16 @@
         "client"
     ],
     "scripts": {
-        "build": "rimraf dist && pnpm build:src && pnpm build:types",
-        "build:src": "zx ../../node_modules/@codama/internals/scripts/build-src.mjs package",
-        "build:types": "zx ../../node_modules/@codama/internals/scripts/build-types.mjs",
-        "dev": "zx ../../node_modules/@codama/internals/scripts/test-unit.mjs node --watch",
-        "lint": "zx ../../node_modules/@codama/internals/scripts/lint.mjs",
-        "lint:fix": "zx ../../node_modules/@codama/internals/scripts/lint.mjs --fix",
-        "test": "pnpm test:types && pnpm test:treeshakability && pnpm test:browser && pnpm test:node && pnpm test:react-native && pnpm test:e2e && pnpm test:exports",
-        "test:browser": "zx ../../node_modules/@codama/internals/scripts/test-unit.mjs browser",
+        "build": "rimraf dist && tsup && tsc -p ./tsconfig.declarations.json",
+        "dev": "vitest --project node",
+        "lint": "eslint . && prettier --check .",
+        "lint:fix": "eslint --fix . && prettier --write .",
+        "test": "pnpm test:types && pnpm test:treeshakability && pnpm test:unit && pnpm test:e2e && pnpm test:exports",
         "test:e2e": "./test/e2e/test.sh",
         "test:exports": "node ./test/exports/module.mjs && node ./test/exports/commonjs.cjs",
-        "test:node": "zx ../../node_modules/@codama/internals/scripts/test-unit.mjs node",
-        "test:react-native": "zx ../../node_modules/@codama/internals/scripts/test-unit.mjs react-native",
-        "test:treeshakability": "zx ../../node_modules/@codama/internals/scripts/test-treeshakability.mjs",
-        "test:types": "zx ../../node_modules/@codama/internals/scripts/test-types.mjs"
+        "test:treeshakability": "for file in dist/index.*.mjs; do agadoo $file; done",
+        "test:types": "tsc --noEmit",
+        "test:unit": "vitest run"
     },
     "dependencies": {
         "@codama/errors": "workspace:*",

+ 1 - 1
packages/renderers-js/tsconfig.json

@@ -2,7 +2,7 @@
     "$schema": "https://json.schemastore.org/tsconfig",
     "compilerOptions": { "lib": [] },
     "display": "@codama/renderers-js",
-    "extends": "../internals/tsconfig.base.json",
+    "extends": "../../tsconfig.json",
     "include": ["src", "test"],
     "exclude": ["test/e2e"]
 }

+ 5 - 0
packages/renderers-js/tsup.config.ts

@@ -0,0 +1,5 @@
+import { defineConfig } from 'tsup';
+
+import { getPackageBuildConfigs } from '../../tsup.config.base';
+
+export default defineConfig(getPackageBuildConfigs());

+ 8 - 0
packages/renderers-js/vitest.config.mts

@@ -0,0 +1,8 @@
+import { defineConfig } from 'vitest/config';
+import { getVitestConfig } from '../../vitest.config.base.mjs';
+
+export default defineConfig({
+    test: {
+        projects: [getVitestConfig('browser'), getVitestConfig('node'), getVitestConfig('react-native')],
+    },
+});

+ 8 - 10
packages/renderers-rust/package.json

@@ -28,18 +28,16 @@
         "client"
     ],
     "scripts": {
-        "build": "rimraf dist && pnpm build:src && pnpm build:types",
-        "build:src": "zx ../../node_modules/@codama/internals/scripts/build-src.mjs node",
-        "build:types": "zx ../../node_modules/@codama/internals/scripts/build-types.mjs",
-        "dev": "zx ../../node_modules/@codama/internals/scripts/test-unit.mjs node --watch",
-        "lint": "zx ../../node_modules/@codama/internals/scripts/lint.mjs",
-        "lint:fix": "zx ../../node_modules/@codama/internals/scripts/lint.mjs --fix",
-        "test": "pnpm test:types && pnpm test:treeshakability && pnpm test:node && pnpm test:e2e && pnpm test:exports",
+        "build": "rimraf dist && tsup && tsc -p ./tsconfig.declarations.json",
+        "dev": "vitest --project node",
+        "lint": "eslint . && prettier --check .",
+        "lint:fix": "eslint --fix . && prettier --write .",
+        "test": "pnpm test:types && pnpm test:treeshakability && pnpm test:unit && pnpm test:e2e && pnpm test:exports",
         "test:e2e": "./e2e/test.sh",
         "test:exports": "node ./test/exports/module.mjs && node ./test/exports/commonjs.cjs",
-        "test:node": "zx ../../node_modules/@codama/internals/scripts/test-unit.mjs node",
-        "test:treeshakability": "zx ../../node_modules/@codama/internals/scripts/test-treeshakability.mjs",
-        "test:types": "zx ../../node_modules/@codama/internals/scripts/test-types.mjs"
+        "test:treeshakability": "for file in dist/index.*.mjs; do agadoo $file; done",
+        "test:types": "tsc --noEmit",
+        "test:unit": "vitest run"
     },
     "dependencies": {
         "@codama/errors": "workspace:*",

+ 1 - 1
packages/renderers-rust/tsconfig.json

@@ -2,6 +2,6 @@
     "$schema": "https://json.schemastore.org/tsconfig",
     "compilerOptions": { "lib": [] },
     "display": "@codama/renderers-rust",
-    "extends": "../internals/tsconfig.base.json",
+    "extends": "../../tsconfig.json",
     "include": ["src", "test"]
 }

+ 8 - 0
packages/renderers-rust/tsup.config.ts

@@ -0,0 +1,8 @@
+import { defineConfig } from 'tsup';
+
+import { getBuildConfig } from '../../tsup.config.base';
+
+export default defineConfig([
+    getBuildConfig({ format: 'cjs', platform: 'node' }),
+    getBuildConfig({ format: 'esm', platform: 'node' }),
+]);

+ 8 - 0
packages/renderers-rust/vitest.config.mts

@@ -0,0 +1,8 @@
+import { defineConfig } from 'vitest/config';
+import { getVitestConfig } from '../../vitest.config.base.mjs';
+
+export default defineConfig({
+    test: {
+        projects: [getVitestConfig('node')],
+    },
+});

+ 5 - 7
packages/renderers-vixen-parser/package.json

@@ -29,13 +29,11 @@
         "parser"
     ],
     "scripts": {
-        "build": "rimraf dist && pnpm build:src && pnpm build:types",
-        "build:src": "zx ../../node_modules/@codama/internals/scripts/build-src.mjs node",
-        "build:types": "zx ../../node_modules/@codama/internals/scripts/build-types.mjs",
-        "dev": "zx ../../node_modules/@codama/internals/scripts/test-unit.mjs node --watch",
-        "lint": "zx ../../node_modules/@codama/internals/scripts/lint.mjs",
-        "lint:fix": "zx ../../node_modules/@codama/internals/scripts/lint.mjs --fix",
-        "test": "zx ../../node_modules/@codama/internals/scripts/test-unit.mjs node",
+        "build": "rimraf dist && tsup && tsc -p ./tsconfig.declarations.json",
+        "dev": "vitest --project node",
+        "lint": "eslint . && prettier --check .",
+        "lint:fix": "eslint --fix . && prettier --write .",
+        "test": "vitest run",
         "test:e2e": "./e2e/test.sh"
     },
     "dependencies": {

+ 1 - 1
packages/renderers-vixen-parser/tsconfig.json

@@ -2,6 +2,6 @@
     "$schema": "https://json.schemastore.org/tsconfig",
     "compilerOptions": { "lib": [] },
     "display": "@codama/renderers-vixen-parser",
-    "extends": "../internals/tsconfig.base.json",
+    "extends": "../../tsconfig.json",
     "include": ["src", "test"]
 }

+ 8 - 0
packages/renderers-vixen-parser/tsup.config.ts

@@ -0,0 +1,8 @@
+import { defineConfig } from 'tsup';
+
+import { getBuildConfig } from '../../tsup.config.base';
+
+export default defineConfig([
+    getBuildConfig({ format: 'cjs', platform: 'node' }),
+    getBuildConfig({ format: 'esm', platform: 'node' }),
+]);

+ 8 - 0
packages/renderers-vixen-parser/vitest.config.mts

@@ -0,0 +1,8 @@
+import { defineConfig } from 'vitest/config';
+import { getVitestConfig } from '../../vitest.config.base.mjs';
+
+export default defineConfig({
+    test: {
+        projects: [getVitestConfig('node')],
+    },
+});

+ 1 - 1
packages/renderers/.prettierignore

@@ -1,5 +1,5 @@
 dist/
-e2e/
+test/e2e/
 test-ledger/
 target/
 CHANGELOG.md

+ 8 - 10
packages/renderers/package.json

@@ -26,16 +26,14 @@
         "renderers"
     ],
     "scripts": {
-        "build": "rimraf dist && pnpm build:src && pnpm build:types",
-        "build:src": "zx ../../node_modules/@codama/internals/scripts/build-src.mjs node",
-        "build:types": "zx ../../node_modules/@codama/internals/scripts/build-types.mjs",
-        "dev": "zx ../../node_modules/@codama/internals/scripts/test-unit.mjs node --watch",
-        "lint": "zx ../../node_modules/@codama/internals/scripts/lint.mjs",
-        "lint:fix": "zx ../../node_modules/@codama/internals/scripts/lint.mjs --fix",
-        "test": "pnpm test:types && pnpm test:treeshakability && pnpm test:node",
-        "test:node": "zx ../../node_modules/@codama/internals/scripts/test-unit.mjs node",
-        "test:treeshakability": "zx ../../node_modules/@codama/internals/scripts/test-treeshakability.mjs",
-        "test:types": "zx ../../node_modules/@codama/internals/scripts/test-types.mjs"
+        "build": "rimraf dist && tsup && tsc -p ./tsconfig.declarations.json",
+        "dev": "vitest --project node",
+        "lint": "eslint . && prettier --check .",
+        "lint:fix": "eslint --fix . && prettier --write .",
+        "test": "pnpm test:types && pnpm test:treeshakability && pnpm test:unit",
+        "test:treeshakability": "for file in dist/index.*.mjs; do agadoo $file; done",
+        "test:types": "tsc --noEmit",
+        "test:unit": "vitest run"
     },
     "dependencies": {
         "@codama/renderers-js": "workspace:*",

+ 1 - 1
packages/renderers/tsconfig.json

@@ -2,6 +2,6 @@
     "$schema": "https://json.schemastore.org/tsconfig",
     "compilerOptions": { "lib": [] },
     "display": "@codama/renderers",
-    "extends": "../internals/tsconfig.base.json",
+    "extends": "../../tsconfig.json",
     "include": ["src", "test"]
 }

+ 8 - 0
packages/renderers/tsup.config.ts

@@ -0,0 +1,8 @@
+import { defineConfig } from 'tsup';
+
+import { getBuildConfig } from '../../tsup.config.base';
+
+export default defineConfig([
+    getBuildConfig({ format: 'cjs', platform: 'node' }),
+    getBuildConfig({ format: 'esm', platform: 'node' }),
+]);

+ 8 - 0
packages/renderers/vitest.config.mts

@@ -0,0 +1,8 @@
+import { defineConfig } from 'vitest/config';
+import { getVitestConfig } from '../../vitest.config.base.mjs';
+
+export default defineConfig({
+    test: {
+        projects: [getVitestConfig('node')],
+    },
+});

+ 1 - 1
packages/validators/.prettierignore

@@ -1,5 +1,5 @@
 dist/
-e2e/
+test/e2e/
 test-ledger/
 target/
 CHANGELOG.md

+ 8 - 12
packages/validators/package.json

@@ -35,18 +35,14 @@
         "visitors"
     ],
     "scripts": {
-        "build": "rimraf dist && pnpm build:src && pnpm build:types",
-        "build:src": "zx ../../node_modules/@codama/internals/scripts/build-src.mjs package",
-        "build:types": "zx ../../node_modules/@codama/internals/scripts/build-types.mjs",
-        "dev": "zx ../../node_modules/@codama/internals/scripts/test-unit.mjs node --watch",
-        "lint": "zx ../../node_modules/@codama/internals/scripts/lint.mjs",
-        "lint:fix": "zx ../../node_modules/@codama/internals/scripts/lint.mjs --fix",
-        "test": "pnpm test:types && pnpm test:treeshakability && pnpm test:browser && pnpm test:node && pnpm test:react-native",
-        "test:browser": "zx ../../node_modules/@codama/internals/scripts/test-unit.mjs browser",
-        "test:node": "zx ../../node_modules/@codama/internals/scripts/test-unit.mjs node",
-        "test:react-native": "zx ../../node_modules/@codama/internals/scripts/test-unit.mjs react-native",
-        "test:treeshakability": "zx ../../node_modules/@codama/internals/scripts/test-treeshakability.mjs",
-        "test:types": "zx ../../node_modules/@codama/internals/scripts/test-types.mjs"
+        "build": "rimraf dist && tsup && tsc -p ./tsconfig.declarations.json",
+        "dev": "vitest --project node",
+        "lint": "eslint . && prettier --check .",
+        "lint:fix": "eslint --fix . && prettier --write .",
+        "test": "pnpm test:types && pnpm test:treeshakability && pnpm test:unit",
+        "test:treeshakability": "for file in dist/index.*.mjs; do agadoo $file; done",
+        "test:types": "tsc --noEmit",
+        "test:unit": "vitest run"
     },
     "dependencies": {
         "@codama/errors": "workspace:*",

+ 1 - 1
packages/validators/tsconfig.json

@@ -2,6 +2,6 @@
     "$schema": "https://json.schemastore.org/tsconfig",
     "compilerOptions": { "lib": [] },
     "display": "@codama/validators",
-    "extends": "../internals/tsconfig.base.json",
+    "extends": "../../tsconfig.json",
     "include": ["src", "test"]
 }

+ 5 - 0
packages/validators/tsup.config.ts

@@ -0,0 +1,5 @@
+import { defineConfig } from 'tsup';
+
+import { getPackageBuildConfigs } from '../../tsup.config.base';
+
+export default defineConfig(getPackageBuildConfigs());

+ 8 - 0
packages/validators/vitest.config.mts

@@ -0,0 +1,8 @@
+import { defineConfig } from 'vitest/config';
+import { getVitestConfig } from '../../vitest.config.base.mjs';
+
+export default defineConfig({
+    test: {
+        projects: [getVitestConfig('browser'), getVitestConfig('node'), getVitestConfig('react-native')],
+    },
+});

+ 1 - 1
packages/visitors-core/.prettierignore

@@ -1,5 +1,5 @@
 dist/
-e2e/
+test/e2e/
 test-ledger/
 target/
 CHANGELOG.md

+ 8 - 12
packages/visitors-core/package.json

@@ -35,18 +35,14 @@
         "visitors"
     ],
     "scripts": {
-        "build": "rimraf dist && pnpm build:src && pnpm build:types",
-        "build:src": "zx ../../node_modules/@codama/internals/scripts/build-src.mjs package",
-        "build:types": "zx ../../node_modules/@codama/internals/scripts/build-types.mjs",
-        "dev": "zx ../../node_modules/@codama/internals/scripts/test-unit.mjs node --watch",
-        "lint": "zx ../../node_modules/@codama/internals/scripts/lint.mjs",
-        "lint:fix": "zx ../../node_modules/@codama/internals/scripts/lint.mjs --fix",
-        "test": "pnpm test:types && pnpm test:treeshakability && pnpm test:browser && pnpm test:node && pnpm test:react-native",
-        "test:browser": "zx ../../node_modules/@codama/internals/scripts/test-unit.mjs browser",
-        "test:node": "zx ../../node_modules/@codama/internals/scripts/test-unit.mjs node",
-        "test:react-native": "zx ../../node_modules/@codama/internals/scripts/test-unit.mjs react-native",
-        "test:treeshakability": "zx ../../node_modules/@codama/internals/scripts/test-treeshakability.mjs",
-        "test:types": "zx ../../node_modules/@codama/internals/scripts/test-types.mjs"
+        "build": "rimraf dist && tsup && tsc -p ./tsconfig.declarations.json",
+        "dev": "vitest --project node",
+        "lint": "eslint . && prettier --check .",
+        "lint:fix": "eslint --fix . && prettier --write .",
+        "test": "pnpm test:types && pnpm test:treeshakability && pnpm test:unit",
+        "test:treeshakability": "for file in dist/index.*.mjs; do agadoo $file; done",
+        "test:types": "tsc --noEmit",
+        "test:unit": "vitest run"
     },
     "dependencies": {
         "@codama/errors": "workspace:*",

+ 1 - 1
packages/visitors-core/tsconfig.json

@@ -2,6 +2,6 @@
     "$schema": "https://json.schemastore.org/tsconfig",
     "compilerOptions": { "lib": [] },
     "display": "@codama/visitors-core",
-    "extends": "../internals/tsconfig.base.json",
+    "extends": "../../tsconfig.json",
     "include": ["src", "test"]
 }

+ 5 - 0
packages/visitors-core/tsup.config.ts

@@ -0,0 +1,5 @@
+import { defineConfig } from 'tsup';
+
+import { getPackageBuildConfigs } from '../../tsup.config.base';
+
+export default defineConfig(getPackageBuildConfigs());

+ 8 - 0
packages/visitors-core/vitest.config.mts

@@ -0,0 +1,8 @@
+import { defineConfig } from 'vitest/config';
+import { getVitestConfig } from '../../vitest.config.base.mjs';
+
+export default defineConfig({
+    test: {
+        projects: [getVitestConfig('browser'), getVitestConfig('node'), getVitestConfig('react-native')],
+    },
+});

+ 1 - 1
packages/visitors/.prettierignore

@@ -1,5 +1,5 @@
 dist/
-e2e/
+test/e2e/
 test-ledger/
 target/
 CHANGELOG.md

Bu fark içinde çok fazla dosya değişikliği olduğu için bazı dosyalar gösterilmiyor