ConsoleTVs / sswr

🔥 Svelte stale while revalidate (SWR) data fetching strategy
MIT License
235 stars 11 forks source link

remove install-peers-cli + postinstall script, bump patch #1

Closed sammccord closed 3 years ago

sammccord commented 3 years ago

I was having issues using this package locally and in CI with node 14 + yarn 1.22.5 Seems acceptable to me to list svelte as a production dependency since source files import it, and safe to assume most consumers will have matching version range to avoid multiple copies.

❯ yarn add sswr
yarn add v1.22.5
warning package.json: No license field
warning project@1.0.0: No license field
[1/4] Resolving packages...
[2/4] Fetching packages...
warning Pattern ["source-map@~0.7.2"] is trying to unpack in the same destination "/home/sam/.cache/yarn/v6/npm-source-map-fast-0.7.3-5302f8169031735226544092e64981f751750383-integrity/node_modules/source-map-fast" as pattern ["source-map-fast@npm:source-map@0.7.3"]. This could result in non-deterministic behavior, skipping.
warning Pattern ["source-map@^0.7.3"] is trying to unpack in the same destination "/home/sam/.cache/yarn/v6/npm-source-map-fast-0.7.3-5302f8169031735226544092e64981f751750383-integrity/node_modules/source-map-fast" as pattern ["source-map-fast@npm:source-map@0.7.3"]. This could result in non-deterministic behavior, skipping.
info fsevents@2.1.3: The platform "linux" is incompatible with this module.
info "fsevents@2.1.3" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
[4/4] Building fresh packages...
error /home/sam/work/project/node_modules/sswr: Command failed.
Exit code: 1
Command: yarn install-peers
Arguments: 
Directory: /home/sam/work/project/node_modules/sswr
Output:
yarn run v1.22.5
warning ../../package.json: No license field
error Command "install-peers" not found.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.

btw thanks for making this library, I was working on something similar a while ago but this ticks all my boxes and I aim to use it extensively in all of my svelte projects :+1:

ConsoleTVs commented 3 years ago

NPM 7 no longer needs peers, can you also update swrev to the latest version? We need that since it comes with important fixes I made and I didn't have the time to update the svelte adapter (this lib). I'm closely working with vswr (the vue adapter using the same core as this one). So expect good updates too 👍

sammccord commented 3 years ago

Updated!

ConsoleTVs commented 3 years ago

Thanks a lot for the effort! I'll also take some time to update the docs sonish, still tinkering about some of the base options!