Package Exports
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (pnpm-sync-dependencies-meta-injected) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
pnpm-sync-dependencies-meta-injected
- Do you use
dependenciesMeta.*.injected = true
? - Are you tired of the fight against the balance between ergonomics and "dependencies being correct"?
This package (with turborepo) will solve all your problems!
Setup
in your
turbo.json
, configure a_syncPnpm
task:"_syncPnpm": { "dependsOn": ["^build"], "cache": false },
It must not have a cache, because we need to modify the
.pnpm
directory in the top-levelnode_modules
folder.In each of your projects that declare a
dependenciesMeta.*.injected = true
, add a_syncPnpm
script in your package.json:"_syncPnpm": "DEBUG=sync-pnpm pnpm sync-dependencies-meta-injected"
In each of your projects now includes
_syncPnpm
, re-configure your project'sstart
command to run_syncPnpm
in watch mode so that you can continually work on your injected dependencies and have updates automatically re-synced as the built are built."start": "concurrently 'ember serve' 'pnpm _syncPnpm --watch' --names 'tests serve,tests sync deps'",
By using
concurrently
, we can run our dev server as well as the_syncPnpm
task in watch mode in parallel.in your
turbe.json
, configure each task that relies on^build
to also rely on_syncPnpm
(no^
) -- this, combined with the above will sync the hard links thatpnpm
uses fordependenciesMeta.*.injected
after the dependencies are built."test": { "outputs": [], "dependsOn": ["_syncPnpm", "^build"] }, "build": { "outputs": ["dist/**"], "dependsOn": ["_syncPnpm", "^build"] }, // etc
Debug
Add
DEBUG=sync-pnpm
before the invocation.
Example of adding to the package.json#scripts
"_syncPnpm": "DEBUG=sync-pnpm pnpm sync-dependencies-meta-injected"