Skip to content

fix: add workspaces field for yarn CI compatibility - #2

Open
CoderSerio wants to merge 5 commits into
mainfrom
fix/ci-workspace
Open

CoderSerio wants to merge 5 commits into
mainfrom
fix/ci-workspace

Conversation

@CoderSerio

Copy link
Copy Markdown
Member

Problem

CI fails at yarn install step because Yarn cannot resolve workspace packages.

Root cause:

  • Project has pnpm-workspace.yaml (for pnpm)
  • But package.json missing workspaces field (required by Yarn)
  • CI uses Yarn, which doesn't read pnpm-workspace.yaml

Solution

Add workspaces field to package.json:

{
  "workspaces": [
    "packages/*",
    "crates/node-binding"
  ]
}

This allows both pnpm and Yarn to properly resolve workspace packages.

Additional Changes

  • Update repository URL from napi-rs/package-template to atom-universe/FeOPack

Testing

CI should now pass the yarn install step and proceed to build/test.

- Add workspaces array to package.json
- Update repository URL to atom-universe/FeOPack
- This allows Yarn CI to properly resolve workspace packages
- Add --no-immutable flag to all yarn install commands
- This allows lockfile updates during CI when package.json changes
- Add 'build' script that runs napi build --platform --release
- CI calls 'yarn build --target <triple>' which now works
- Change cache from yarn to pnpm
- Replace yarn install with pnpm install
- Replace yarn build with pnpm build
- Replace yarn lint with pnpm lint
- Remove yarn-specific configurations
- Add pnpm/action-setup@v4 to install pnpm before use
- Required because pnpm is not pre-installed on GitHub runners
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.

1 participant