Skip to content

chore: resolve workspace cross-dependencies from source#174

Open
Reversean wants to merge 3 commits intomasterfrom
chore/fix-cross-dependencies
Open

chore: resolve workspace cross-dependencies from source#174
Reversean wants to merge 3 commits intomasterfrom
chore/fix-cross-dependencies

Conversation

@Reversean
Copy link
Member

Closes #173

Summary

  • Add resolve.conditions: ['source'] and ssr.resolve.conditions: ['source'] to packages/javascript vite and vitest configs, and packages/sveltekit vite config — so Vite/Vitest resolve cross-workspace imports from TypeScript source instead of dist/
  • Bundle @hawk.so/core into @hawk.so/javascript output instead of externalizing it (core is not published to npm separately yet); move core to devDependencies
  • Add AGPL-3.0-only to the license allow list in rollup-plugin-license since core shares the same license

Result

build:modified and test:modified now work from a clean checkout with no pre-built dist/ in any workspace.

@Reversean Reversean force-pushed the chore/fix-cross-dependencies branch from 7418c75 to 4b16d8c Compare March 11, 2026 13:57
Add resolve.conditions: ['source'] to vite and vitest configs so
workspace deps are resolved from TypeScript source instead of dist.
This allows build:modified and test:modified to run against changed
packages without requiring their deps to be pre-built.

- packages/javascript:
  - bundle @hawk.so/core instead of externalizing it
  - move @hawk.so/core to devDependencies
  - add AGPL-3.0-only to license allow list
  - add ssr.resolve.conditions for Vite 7 node/SSR environment
- packages/sveltekit:
  - add resolve.conditions: ['source']
- packages/sveltekit/playground:
  - add resolve.conditions: ['source']
"error-stack-parser": "^2.1.4"
},
"devDependencies": {
"@hawk.so/core": "workspace:^",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

its not clear for me, why core became a dev dependency?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since @hawk.so/core is now bundled into @hawk.so/javascript dist/ (compiled into output) I'm not sure it's runtime-dependency anymore.

And since @hawk.so/core required only during building perhaps it should be used as dev-dependency.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

all dependencies are bundles into dist, for example "error-stack-parser".

So it is still not clear, what is the difference

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moved @hawk.so/core to dependencies

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

build/test fails on clean env for workspaces with cross-dependencies

2 participants