Macil / flow-copy-source

Script to copy javascript files and append ".flow" to the filename
MIT License
173 stars 13 forks source link

Upgrade chokidar to support Node 10.x #13

Closed bemisguided closed 6 years ago

bemisguided commented 6 years ago

chokidar v2.0.0 uses upath c1.0.2 which had a <=9 restriction for its package.json engines property.

chokidar v2.0.3 is the latest and uses upath v1.0.5 which no longer has this restriction.

Currently we are forced to use --ignore-engines when building our libraries that use this project.

Macil commented 6 years ago

Sorry, I'm not sure I understand your issue. The chokidar dependency is specified in package.json as ^2.0.0, so when flow-copy-source is installed using npm or yarn, npm/yarn will install the latest version of chokidar that's greater than or equal to 2.0.0 and less than 3.0.0. (Maybe your application has an old version of chokidar or upath in its package-lock.json/npm-shrinkwrap.json/yarn.lock/node_modules. Within your application's directory, trying running rm -rf package-lock.json npm-shrinkwrap.json yarn.lock node_modules and then run npm i or yarn to upgrade all of your dependencies and subdependencies to the latest versions within their acceptable ranges.)

This package's yarn.lock is only respected when you run yarn within this package's repository, so the yarn.lock is only intended to be used by people developing flow-copy-source and the CI system. It turns out the yarn.lock already contained chokidar 2.0.3 and upath 1.1.0, so I don't see a reason to merge this.

bemisguided commented 6 years ago

Thanks for merging down.

flow-copy-source was the only module using these dependencies. I had also done the wipe yarn.lock file and start fresh but it would still fail before starting the install / download of dependencies. I wonder if the engine check happens before it fully resolves the versions dependencies to install. Maybe because it's a transient dependency of a transient dependency. Dunno, I just know that the newer upath dependency doesn't have the <=9 and that is references as of chokidar v2.0.3.

Macil commented 6 years ago

Sorry, I didn't actually merge, but I don't think it will make a difference. (I edited my message after making it when I saw yarn.lock already contained chokidar 2.0.3 and upath 1.1.0.)

If you install flow-copy-source into an empty directory, you should see chokidar 2.0.3 and upath 1.1.0 (or higher) installed:

Console example

``` [chris /tmp/foo]$ ls [chris /tmp/foo]$ yarn add flow-copy-source yarn add v1.7.0 info No lockfile found. [1/4] 🔍 Resolving packages... ⠁ (node:11531) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead. [2/4] 🚚 Fetching packages... [3/4] 🔗 Linking dependencies... [4/4] 📃 Building fresh packages... success Saved lockfile. success Saved 165 new dependencies. info Direct dependencies └─ flow-copy-source@2.0.0 info All dependencies ├─ abbrev@1.1.1 ├─ ansi-regex@2.1.1 ├─ anymatch@2.0.0 ├─ aproba@1.2.0 ├─ are-we-there-yet@1.1.5 ├─ arr-flatten@1.1.0 ├─ assign-symbols@1.0.0 ├─ async-each@1.0.1 ├─ atob@2.1.1 ├─ balanced-match@1.0.0 ├─ base@0.11.2 ├─ binary-extensions@1.11.0 ├─ brace-expansion@1.1.11 ├─ braces@2.3.2 ├─ cache-base@1.0.1 ├─ camelcase@4.1.0 ├─ chokidar@2.0.3 ├─ chownr@1.0.1 ├─ class-utils@0.3.6 ├─ cliui@4.1.0 ├─ code-point-at@1.1.0 ├─ collection-visit@1.0.0 ├─ concat-map@0.0.1 ├─ console-control-strings@1.1.0 ├─ copy-descriptor@0.1.1 ├─ core-util-is@1.0.2 ├─ cross-spawn@5.1.0 ├─ debug@2.6.9 ├─ decamelize@1.2.0 ├─ decode-uri-component@0.2.0 ├─ deep-extend@0.6.0 ├─ delegates@1.0.0 ├─ detect-libc@1.0.3 ├─ execa@0.7.0 ├─ expand-brackets@2.1.4 ├─ extglob@2.0.4 ├─ fill-range@4.0.0 ├─ find-up@2.1.0 ├─ flow-copy-source@2.0.0 ├─ for-in@1.0.2 ├─ fs-extra@6.0.1 ├─ fs-minipass@1.2.5 ├─ fs.realpath@1.0.0 ├─ fsevents@1.2.4 ├─ gauge@2.7.4 ├─ get-caller-file@1.0.2 ├─ get-stream@3.0.0 ├─ get-value@2.0.6 ├─ glob-parent@3.1.0 ├─ glob@7.1.2 ├─ graceful-fs@4.1.11 ├─ has-unicode@2.0.1 ├─ has-value@1.0.0 ├─ has-values@1.0.0 ├─ iconv-lite@0.4.23 ├─ ignore-walk@3.0.1 ├─ inflight@1.0.6 ├─ inherits@2.0.3 ├─ ini@1.3.5 ├─ invert-kv@1.0.0 ├─ is-accessor-descriptor@1.0.0 ├─ is-binary-path@1.0.1 ├─ is-data-descriptor@1.0.0 ├─ is-descriptor@1.0.2 ├─ is-extglob@2.1.1 ├─ is-fullwidth-code-point@2.0.0 ├─ is-glob@4.0.0 ├─ is-odd@2.0.0 ├─ is-plain-object@2.0.4 ├─ is-stream@1.1.0 ├─ is-windows@1.0.2 ├─ isarray@1.0.0 ├─ isexe@2.0.0 ├─ jsonfile@4.0.0 ├─ kefir@3.8.3 ├─ kind-of@3.2.2 ├─ lcid@1.0.0 ├─ locate-path@2.0.0 ├─ lru-cache@4.1.3 ├─ map-visit@1.0.0 ├─ mem@1.1.0 ├─ micromatch@3.1.10 ├─ mimic-fn@1.2.0 ├─ minimatch@3.0.4 ├─ minimist@0.0.8 ├─ minizlib@1.1.0 ├─ mixin-deep@1.3.1 ├─ mkdirp@0.5.1 ├─ ms@2.0.0 ├─ nan@2.10.0 ├─ nanomatch@1.2.9 ├─ needle@2.2.1 ├─ node-pre-gyp@0.10.0 ├─ nopt@4.0.1 ├─ npm-bundled@1.0.3 ├─ npm-packlist@1.1.10 ├─ npm-run-path@2.0.2 ├─ npmlog@4.1.2 ├─ number-is-nan@1.0.1 ├─ object-assign@4.1.1 ├─ object-copy@0.1.0 ├─ os-homedir@1.0.2 ├─ os-locale@2.1.0 ├─ os-tmpdir@1.0.2 ├─ osenv@0.1.5 ├─ p-finally@1.0.0 ├─ p-limit@1.3.0 ├─ p-locate@2.0.0 ├─ p-try@1.0.0 ├─ pascalcase@0.1.1 ├─ path-dirname@1.0.2 ├─ path-exists@3.0.0 ├─ path-key@2.0.1 ├─ posix-character-classes@0.1.1 ├─ process-nextick-args@2.0.0 ├─ pseudomap@1.0.2 ├─ rc@1.2.8 ├─ readable-stream@2.3.6 ├─ readdirp@2.1.0 ├─ remove-trailing-separator@1.1.0 ├─ repeat-element@1.1.2 ├─ require-directory@2.1.1 ├─ require-main-filename@1.0.1 ├─ resolve-url@0.2.1 ├─ ret@0.1.15 ├─ rimraf@2.6.2 ├─ safer-buffer@2.1.2 ├─ sax@1.2.4 ├─ semver@5.5.0 ├─ set-blocking@2.0.0 ├─ set-immediate-shim@1.0.1 ├─ set-value@2.0.0 ├─ shebang-command@1.2.0 ├─ shebang-regex@1.0.0 ├─ signal-exit@3.0.2 ├─ snapdragon-node@2.1.1 ├─ snapdragon-util@3.0.1 ├─ source-map-resolve@0.5.2 ├─ source-map-url@0.4.0 ├─ source-map@0.5.7 ├─ split-string@3.1.0 ├─ static-extend@0.1.2 ├─ string_decoder@1.1.1 ├─ string-width@2.1.1 ├─ strip-ansi@3.0.1 ├─ strip-eof@1.0.0 ├─ strip-json-comments@2.0.1 ├─ symbol-observable@1.0.4 ├─ tar@4.4.4 ├─ to-regex-range@2.1.1 ├─ union-value@1.0.0 ├─ universalify@0.1.1 ├─ unset-value@1.0.0 ├─ upath@1.1.0 ├─ urix@0.1.0 ├─ use@3.1.0 ├─ util-deprecate@1.0.2 ├─ which-module@2.0.0 ├─ which@1.3.1 ├─ wide-align@1.1.3 ├─ wrap-ansi@2.1.0 ├─ y18n@3.2.1 ├─ yallist@3.0.2 ├─ yargs-parser@9.0.2 └─ yargs@11.0.0 ✨ Done in 5.44s. ```