Commit Graph

75 Commits

Author SHA1 Message Date
Stéphan Kochen 56e3459543 Support isolated builds with a combined cache 2024-02-11 14:02:57 +01:00
Stéphan Kochen 799d16b263 Remove redundant tar file listing
`yarn pack` already logs a file listing.
2024-02-06 19:21:18 +01:00
Stéphan Kochen df1c72a4f6 Use a combined cache derivation by default 2024-02-06 19:20:45 +01:00
Stéphan Kochen 67fadc3f61 Relax an isolatedBuilds check 2024-02-06 12:11:26 +01:00
Stéphan Kochen b08b1a05ef Use copy-on-write if possible 2024-02-05 16:12:18 +01:00
Stéphan Kochen f5c9f25c94 Fix missing PnP linkers if node_modules exists
This can happen because some tools write to `node_modules/.cache` as a
convention.
2023-11-01 13:36:01 +01:00
Stéphan Kochen 5cedf615d4 Log invalid locator 2023-10-31 08:52:48 +01:00
Stéphan Kochen ca3d96ae1d Fix optional dependencies 2023-10-30 14:14:52 +01:00
Stéphan Kochen ee8c72b3a9 Yarn v4 support 2023-10-29 22:23:22 +01:00
Stéphan Kochen a1ab08efae Upgrade prettier 2023-10-29 13:39:57 +01:00
Stéphan Kochen 3bbec9935a Merge pull request #71 from nicknovitski/lock-fix
Fix lockfile name
2023-10-16 20:12:37 +02:00
Nick Novitski 52227131b8 Remove references to lockfileFilename
This field will be removed from yarn in version 4: https://github.com/yarnpkg/berry/pull/5604

With this change, the plugin works with the current canary release, v4.0.0-rc.53.
2023-10-10 08:36:51 -07:00
Nick Novitski 435d052e1c Fix lockfile name 2023-10-02 17:02:07 -07:00
Stéphan Kochen c680c0b6af Error if cache folder is outside project 2023-01-23 15:18:06 +01:00
Stéphan Kochen 10a8f5a83b More relative path fixes 2023-01-23 15:13:50 +01:00
Stéphan Kochen 4078ee09c9 Fix up install directories 2023-01-23 14:48:37 +01:00
Stéphan Kochen 721d643e11 Fix install for projects with workspaces 2023-01-23 14:34:59 +01:00
Stéphan Kochen 37a7bf2c31 Merge pull request #51 from nicknovitski/yarn-overrides
yarn packages respect overrideAttrs
2023-01-23 14:08:21 +01:00
Stéphan Kochen 59ff733bf0 Fix yarn path when nix expr is in a subdirectory 2023-01-23 13:56:46 +01:00
Nick Novitski f298f56358 yarn packages respect overrideAttrs 2022-11-21 15:41:18 -08:00
Stéphan Kochen a357ca5b7f Fix incorrect paths in generated expression 2022-11-09 13:22:02 +01:00
Stéphan Kochen b959792865 Copy the lockfile to the installation.
The `yarn nixify install-bin` step fails without it.
2022-11-04 16:05:09 +01:00
Stéphan Kochen c02b964a4c Fix incomplete render when --mode is used 2022-10-23 08:58:56 +02:00
Stéphan Kochen 26d88f0295 Sort cache entries 2022-10-22 21:40:19 +02:00
Stéphan Kochen c58f4b3338 Export yarn-freestanding 2022-10-21 20:29:28 +02:00
Stéphan Kochen 60aa1f4434 Add support for ESM 2022-10-18 22:02:05 +02:00
Stéphan Kochen efae8a0744 Separate vars we don't want in a Nix shell 2022-10-18 22:02:05 +02:00
Stéphan Kochen d23c611065 Replace yarn alias with a shell script
This makes the yarn command available in Nix shell and direnv.
2022-10-18 21:49:33 +02:00
Stéphan Kochen 1a432073f4 Ensure PnP loader is copied to package. Fixes #36. 2022-09-13 07:50:29 +02:00
Nick Novitski de3c8e654b Fix installPhase when $sourceRoot != $name 2022-07-20 15:11:32 -07:00
Nick Novitski d7620c8bd3 Include fewer files in packages
- Only include either one of `node_modules` or `.yarn/cache` directories
- When a `files:` field is present in the package.json file, only
  include files matching those patterns
2022-07-14 10:45:07 -07:00
Stéphan Kochen 5c97d8d7b2 Merge pull request #30 from nicknovitski/passthru-yarn
Add passthru yarn derivation
2022-07-13 13:35:56 +02:00
Nick Novitski 51c362c530 Add passthru yarn derivation
This can be used to run any scripts in the package.
2022-07-12 19:15:52 -07:00
Nick Novitski 0bc1da471a Use nix package name rather than source directory name 2022-07-12 18:53:40 -07:00
Stéphan Kochen 321a0d7e19 Remove unused imports 2022-02-13 21:19:54 +01:00
Stéphan Kochen fcc976dcfb Add option to install binaries of dependencies 2022-01-29 19:59:27 +01:00
Adrian Gierakowski c999d4070c feature: handle git dependencies
- add git and cacert as deps to cacheDrvs
- use pkg.reference instead of version in package.json of isolated builds
  since it allow yarn to find the git repo (this will probably also fix
  oter type of deps)
2022-01-26 07:35:39 +01:00
Stéphan Kochen 01bf568bdc Revert "feature: handle git dependencies"
This reverts commit f957a93479.
2022-01-25 22:22:38 +01:00
Stéphan Kochen baae657ea8 Merge pull request #8 from DeversiFi/bugfix/restore-install-state-at-the-start-of-inject-build
bugfix: inject-build: storedBuildState handling
2022-01-25 20:03:26 +01:00
Adrian Gierakowski f957a93479 feature: handle git dependencies
- add git and cacert as deps to cacheDrvs
- use pkg.reference instead of version in package.json of isolated builds
  since it allow yarn to find the git repo (this will probably also fix
  oter type of deps)
2022-01-21 16:04:09 +00:00
Adrian Gierakowski dd30036316 bugfix: inject-build: storedBuildState handling
call restoreInstallState so that state written by previous invocations
to inject-build doesn't get lost

before this fix, all but the last one of the injected isolated builds
would be re-run when building main package
2022-01-21 15:48:22 +00:00
Stéphan Kochen 645da1ae02 Account for mismatch in 'fetch-one' filename 2022-01-04 15:20:16 +01:00
Stéphan Kochen abd295cc50 Revert "Account for mismatch in 'fetch-one' filename"
This reverts commit 7122fcf881.
2022-01-04 15:01:48 +01:00
Stéphan Kochen 7122fcf881 Account for mismatch in 'fetch-one' filename 2022-01-04 14:39:51 +01:00
Joe DeVivo cface0f015 Move runHook preConfigure so it can patch deps 2022-01-04 13:44:26 +01:00
Stéphan Kochen 00b7adf473 Upgrade dependencies, require Yarn 3.1.0 2021-12-14 09:55:35 +01:00
Stéphan Kochen d2c46886a6 Handle Yarn cache entries without checksums 2021-12-14 09:50:00 +01:00
Stéphan Kochen b6033729fe Revert "Remove --immutable-cache in yarn install command"
This reverts commit 2635212b77.
2021-12-14 09:39:33 +01:00
Stéphan Kochen 2635212b77 Remove --immutable-cache in yarn install command
Since Yarn 3.1.0, some cache items no longer have checksums, mostly
derived items like patched packages. Nixify skipped these, but that has
started causing `--immutable-cache` to complain about the missing
entries.

Instead, we will have to rely on the Nix sandbox for purity, so that
Yarn only does local operations (like patching) when to fill in these
missing cache entries.
2021-12-13 16:35:27 +01:00
Stéphan Kochen 2757cfd115 Upgrade to Yarn v3 2021-08-15 21:36:55 +02:00