Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: fix & update dependencies #11119

Merged
merged 16 commits into from
Apr 11, 2018

Conversation

ncoden
Copy link
Contributor

@ncoden ncoden commented Apr 2, 2018

📦 Fix & update package versions:

  • Use permissive selector for all compatible dependencies versions
    We actually support jQuery >= v2.2.0 and what-input >= v4.1.0. There is no point with using the "minor only" selector for dependencies when we do support older versions. See Dependencies migrations below.
  • Update all devDependencies to latest versions
    Using David CLI. See DevDependencies migrations below.
  • Remove unused devDependencies
    Remove process-nextick-args, gulp-ruby-sass and vinyl-source-stream
  • Update dependencies lockfiles
    Using Synp to get synchronized lockfiles
    Install depedencies with yarn (for yarn.lock) then generate package-lock.json with npm i --lock-file-only. Locked dependencies should be the sames but with the perfect lockfile format for each package manager.
  • Update required Node version to v6.4.0
    Node v6.4.0 is required by puppeteer in mocha-headless-chrome. All others packages works with Node v4.0

🚀 New packages:

  • Switch from babel-plugin-* to babel-preset-env, vinyl-source-stream
    This is now the recommended way to deal with babel plugins. This is better than simply updating babel plugins.

📝 Dependencies changelogs

📝 DevDependencies migrations

⚠️ Todo

We actually support jQuery `>= v2.2.0` and what-input `>= v4.1.0`. There is no point with using the "minor only" selector for dependencies when we do support older versions.
Node v6.4.0 is required by `puppeteer` in `mocha-headless-chrome`. All others packages works with Node v4.0
@ncoden ncoden added this to the 6.5.0 milestone Apr 2, 2018
@ncoden ncoden requested a review from DanielRuf April 2, 2018 18:27
@DanielRuf
Copy link
Contributor

gulp-rsync does not need the caret semver selector? Would be like a locked version in the current case.

@ncoden
Copy link
Contributor Author

ncoden commented Apr 2, 2018

@DanielRuf This was set by david. I guess it's because gulp-rsync is still in a pre-release version 0.* and according to SemVer, this is instable and API changes can happen in minor releases. So I would keep it like this.

@DanielRuf
Copy link
Contributor

Got a few of these:

WARN registry Unexpected warning for https://registry.npmjs.org/: Miscellaneous Warning EINTEGRITY: sha512-jd5MkIUlbbmb07nXH0DT3y7rDVtkzDi4XZOUVWAer8ajmF/DTSSbl5oNFyDOl/OXA33Bl79+ypHhl2pN20VeOQ== integrity checksum failed when using sha512: wanted sha512-jd5MkIUlbbmb07nXH0DT3y7rDVtkzDi4XZOUVWAer8ajmF/DTSSbl5oNFyDOl/OXA33Bl79+ypHhl2pN20VeOQ== but got sha1-9HPdR+AnegjijpvsWu6wR1HwuMk=. (128119 bytes)

Because of sha512 hashes but I guess sha1 is still used by default by npm.

@ncoden
Copy link
Contributor Author

ncoden commented Apr 2, 2018

  • Check checksums

@ncoden ncoden changed the title chore: fix & update dependencies [WIP] chore: fix & update dependencies Apr 2, 2018
@DanielRuf
Copy link
Contributor

Daniel@Daniel-MSI MINGW64 ~/GITHUB/foundation-sites (ncoden-chore/update-dependencies)
$ npm i
npm WARN ajv-keywords@2.1.1 requires a peer of ajv@^5.0.0 but none was installed.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.1.3 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

added 115 packages in 16.602s

Daniel@Daniel-MSI MINGW64 ~/GITHUB/foundation-sites (ncoden-chore/update-dependencies)
$ npm outdated
Package                Current         Wanted  Latest  Location
foundation-docs          0.2.1            git     git  foundation-sites
parker           1.0.0-alpha.0  1.0.0-alpha.0  0.0.10  foundation-sites
yargs                   11.0.0         11.1.0  11.0.0  foundation-sites

@DanielRuf
Copy link
Contributor

The ajv issue might be an npm issue, see ajv-validator/ajv#708

@DanielRuf
Copy link
Contributor

$ npm i
WARN registry Unexpected warning for https://registry.npmjs.org/: Miscellaneous Warning EINTEGRITY: sha512-jd5MkIUlbbmb07nXH0DT3y7rDVtkzDi4XZOUVWAer8ajmF/DTSSbl5oNFyDOl/OXA33Bl79+ypHhl2pN20VeOQ== integrity checksum failed when using sha512: wanted sha512-jd5MkIUlbbmb07nXH0DT3y7rDVtkzDi4XZOUVWAer8ajmF/DTSSbl5oNFyDOl/OXA33Bl79+ypHhl2pN20VeOQ== but got sha1-9HPdR+AnegjijpvsWu6wR1HwuMk=. (128119 bytes)
WARN registry Using stale package data from https://registry.npmjs.org/ due to a request error during revalidation.
WARN registry Unexpected warning for https://registry.npmjs.org/: Miscellaneous Warning EINTEGRITY: sha512-wGUIVQXuehL5TCqQun8OW81jGzAWycqzFF8lFp+GOM5BXLYj3bKNsYC4daB7n6XjCqxQA/qgTJ+8ANR3acjrog== integrity checksum failed when using sha512: wanted sha512-wGUIVQXuehL5TCqQun8OW81jGzAWycqzFF8lFp+GOM5BXLYj3bKNsYC4daB7n6XjCqxQA/qgTJ+8ANR3acjrog== but got sha1-O7xCdd1YTMGxCAm4nU6LY6aednU=. (2194 bytes)
WARN registry Using stale package data from https://registry.npmjs.org/ due to a request error during revalidation.
WARN registry Unexpected warning for https://registry.npmjs.org/: Miscellaneous Warning EINTEGRITY: sha512-9nCNoAOBCUahdG+uyqS1XBwS8u1YwXashUYt7T165b3MsDiLYqLMCFwhabzIET9qf0UTP2GLGYM48S9Ghtv/fQ== integrity checksum failed when using sha512: wanted sha512-9nCNoAOBCUahdG+uyqS1XBwS8u1YwXashUYt7T165b3MsDiLYqLMCFwhabzIET9qf0UTP2GLGYM48S9Ghtv/fQ== but got sha1-gJmtGeCMeBnbQf+cSjrE249QpvA=. (247000 bytes)
WARN registry Using stale package data from https://registry.npmjs.org/ due to a request error during revalidation.
WARN registry Unexpected warning for https://registry.npmjs.org/: Miscellaneous Warning EINTEGRITY: sha512-YjuID3+QdvdqNB0fZmZKvb6hsGhlMFqkblgwB+yg6QiUI7dAoJzloThcMtkzjJj8/zbADF+ePPB4sWbWVOYjGw== integrity checksum failed when using sha512: wanted sha512-YjuID3+QdvdqNB0fZmZKvb6hsGhlMFqkblgwB+yg6QiUI7dAoJzloThcMtkzjJj8/zbADF+ePPB4sWbWVOYjGw== but got sha1-6sJkxfx3/y53kB43AQ7PQ5jiIWk=. (16583 bytes)
WARN registry Using stale package data from https://registry.npmjs.org/ due to a request error during revalidation.
 registry Unexpected warning for https://registry.npmjs.org/: Miscellaneous Warning EINTEGRITY: sha512-RdyZWOKFxLoYZUYDTATEWDNFy06+FppokbfBfNd15vp8VyA8iiANYD+ZC3prIjqoVL+mEWSSPRi24FbayFDQxw== integrity checksum failed when using sha512: wanted sha512-RdyZWOKFxLoYZUYDTATEWDNFy06+FppokbfBfNd15vp8VyA8iiANYD+ZC3prIjqoVL+mEWSSPRi24FbayFDQxw== but got sha1-WNu+pCTgTn6TXetXZUzCP/ffwnw=. (23709 bytes)
WARN registry Using stale package data from https://registry.npmjs.org/ due to a request error during revalidation.
WARN registry Unexpected warning for https://registry.npmjs.org/: Miscellaneous Warning EINTEGRITY: sha512-3MM3UjZ5p8EJrYpG7s+29HAI9G7sTzKEe4+w37Dg0QP7qL4XGsV+Q2xet2cE37AqdgN1OtYQB6Vl98YiPV3PgA== integrity checksum failed when using sha512: wanted sha512-3MM3UjZ5p8EJrYpG7s+29HAI9G7sTzKEe4+w37Dg0QP7qL4XGsV+Q2xet2cE37AqdgN1OtYQB6Vl98YiPV3PgA== but got sha1-4ijjOGuTh6RxAAemQfEnsAvkS1I=. (202723 bytes)
WARN registry Using stale package data from https://registry.npmjs.org/ due to a request error during revalidation.
WARN registry Unexpected warning for https://registry.npmjs.org/: Miscellaneous Warning EINTEGRITY: sha512-jd5MkIUlbbmb07nXH0DT3y7rDVtkzDi4XZOUVWAer8ajmF/DTSSbl5oNFyDOl/OXA33Bl79+ypHhl2pN20VeOQ== integrity checksum failed when using sha512: wanted sha512-jd5MkIUlbbmb07nXH0DT3y7rDVtkzDi4XZOUVWAer8ajmF/DTSSbl5oNFyDOl/OXA33Bl79+ypHhl2pN20VeOQ== but got sha1-9HPdR+AnegjijpvsWu6wR1HwuMk=. (128119 bytes)
WARN registry Using stale package data from https://registry.npmjs.org/ due to a request error during revalidation.
WARN registry Unexpected warning for https://registry.npmjs.org/: Miscellaneous Warning EINTEGRITY: sha512-zHo8v+otD1J10j/tC+VNoGK9keCuByhKovAvdn74dmxJl9+mWHnx6EMsDN4lgRoMI/eYo2nchAxniIbUPb5onw== integrity checksum failed when using sha512: wanted sha512-zHo8v+otD1J10j/tC+VNoGK9keCuByhKovAvdn74dmxJl9+mWHnx6EMsDN4lgRoMI/eYo2nchAxniIbUPb5onw== but got sha1-NEKlCPr8KFAEhv7qmUCWduTuWm8=. (5993 bytes)
WARN registry Using stale package data from https://registry.npmjs.org/ due to a request error during revalidation.

@DanielRuf
Copy link
Contributor

DanielRuf commented Apr 2, 2018

$ npm start

> foundation-sites@6.4.3 start C:\Users\Daniel\GITHUB\foundation-sites
> gulp

[22:49:45] Using gulpfile ~\GITHUB\foundation-sites\gulpfile.js
[22:49:45] Starting 'clean'...
[22:49:45] Finished 'clean' after 7.47 ms
[22:49:45] Starting 'copy'...
[22:49:45] Finished 'copy' after 5.7 ms
[22:49:45] Starting 'docs:all'...
[22:49:46] Starting 'sass:deps'...
[22:49:46] Starting 'javascript:plugin-core'...
[22:49:46] Starting 'javascript:deps'...
[22:49:46] Starting 'javascript:docs'...
[22:49:46] Starting 'watch'...
[22:49:46] Finished 'watch' after 594 ms
[22:49:47] Finished 'javascript:deps' after 1.45 s
[22:49:48] Supercollider: processed abide.html in 0.41 s with sass, js
[22:49:48] Supercollider: processed accessibility.html in 0.73 s
fs.js:648
  return binding.open(pathModule._makeLong(path), stringToFlags(flags), mode);
                 ^

Error: ENOENT: no such file or directory, open 'C:\Users\Daniel\GITHUB\foundation-sites\docs\pages\assets\css\docs.css'
    at Object.fs.openSync (fs.js:648:18)
    at Object.fs.readFileSync (fs.js:553:33)
    at Object.self.MD5 (C:\Users\Daniel\GITHUB\foundation-sites\node_modules\cachebust\lib\cachebust.js:35:23)
    at Object.exports.busted (C:\Users\Daniel\GITHUB\foundation-sites\node_modules\cachebust\lib\cachebust.js:64:40)
    at C:\Users\Daniel\GITHUB\foundation-sites\node_modules\gulp-cache-bust\index.js:47:40
    at C:\Users\Daniel\GITHUB\foundation-sites\node_modules\graceful-fs\graceful-fs.js:78:16
    at FSReqWrap.readFileAfterClose [as oncomplete] (fs.js:513:3)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! foundation-sites@6.4.3 start: `gulp`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the foundation-sites@6.4.3 start script.

@DanielRuf
Copy link
Contributor

DanielRuf commented Apr 2, 2018

We have to update the gulp tasks as run-sequence works different now (probably).

@DanielRuf
Copy link
Contributor

Fixed the wrongly calculated basePath of gulp-cache-bust. Also see furzeface/gulp-cache-bust#17

I did not update all Gulp tasks but we may have to do it.
The order is not kept and we should use run-sequence in more places.

@ncoden
Copy link
Contributor Author

ncoden commented Apr 3, 2018

@DanielRuf Thanks ! Did you checked changelogs or just repaired where there were errors ?
Please check (and add migrations notices) the devDependencies list above for the packages you checked.

@ncoden
Copy link
Contributor Author

ncoden commented Apr 3, 2018

return binding.open(pathModule._makeLong(path), stringToFlags(flags), mode);
    ...

I got this error when switching between branch without reinstalling packages. Sometimes NPM do not reinstall everything and I have to delete node_modules.

@DanielRuf
Copy link
Contributor

Did you checked changelogs or just repaired where there were errors ?
Please check (and add migrations notices) the devDependencies list above for the packages you checked.

Just checked the changes based on the current readme.

Will check all now.

@ncoden
Copy link
Contributor Author

ncoden commented Apr 3, 2018

Just checked the changes based on the current readme. Will check all now.

I can take care of the migrations. Please just update "DevDependencies migrations" with the changes you already made.

@DanielRuf
Copy link
Contributor

Getting Uncaught TypeError: Cannot read property 'getAttribute' of undefined at http://localhost:3000/kitchen-sink.html

@ncoden
Copy link
Contributor Author

ncoden commented Apr 4, 2018

Getting Uncaught TypeError: Cannot read property 'getAttribute' of undefined at http://localhost:3000/kitchen-sink.html

I cannot reproduce it :/

@DanielRuf
Copy link
Contributor

I cannot reproduce it :/

Did you scroll a bit and then reload the page? Got it at least there but can also test later today again if it is still relevant.

@ncoden
Copy link
Contributor Author

ncoden commented Apr 4, 2018

Ok I can reproduce it.

@DanielRuf
Copy link
Contributor

True. But I don't remember seeing this one.

At least I saw it in the chats with @hal869
foundation/motion-ui#99

Changes:
* add required `mode` option. Use "development" mode as optimization are handled by others gulp plugins.
* use `webpack` instead of `webpack2`
* remove stats about chunks (set as true by default in webpack 4)
@ncoden
Copy link
Contributor Author

ncoden commented Apr 5, 2018

  • Migrate to Webpack 4
  • Check checksums

Done.

Steps:
1. Install packages with Yarn, generating `yarn.lock` with sha1 integrity hashs (sha256/512 used by NPM is not supported by Yarn)
2. Generate `package-lock.json` alone with `npm i --package-lock-only`

Resolved dependencies should be the sames but with the perfect lockfile format for each package manager.
@ncoden ncoden force-pushed the chore/update-dependencies branch from 078bdbf to dce21c1 Compare April 5, 2018 22:17
@ncoden
Copy link
Contributor Author

ncoden commented Apr 7, 2018

The magellan bug is not caused by this PR. I can reproduce it on develop.

@DanielRuf
Copy link
Contributor

The magellan bug is not caused by this PR. I can reproduce it on develop.

Sure, just wanted to mention it and my other findings.

@ncoden
Copy link
Contributor Author

ncoden commented Apr 7, 2018

The magellan bug is not caused by this PR. I can reproduce it on develop.

@DanielRuf See #11142

@ncoden
Copy link
Contributor Author

ncoden commented Apr 10, 2018

  • Update Motion-UI

I'll delay this to an other PR as there is some bugs I would like to resolve in Motion-UI before a release, and Dependabot is not happy with our dependencies still out-of-dates.

@DanielRuf Could you make a final review ?

@DanielRuf
Copy link
Contributor

We could also update to webpack 4.5 probably ;-)

Ok, will do so.

@ncoden
Copy link
Contributor Author

ncoden commented Apr 10, 2018

We could also update to webpack 4.5 probably ;-)

True.

@ncoden
Copy link
Contributor Author

ncoden commented Apr 10, 2018

Updated dependencies:

  • gulp-sass ^2.1.0 -> ^v4.0.1
  • mocha-headless-chrome ^1.8.2 -> ^1.8.3
  • sass-true ^2.2.2 -> ^4.0.0
  • webpack 3.5.5 -> ^4.5.0

Changes are only deprecation of node 4, bug fixes and new features. No migration is required.

@ncoden ncoden changed the title [WIP] chore: fix & update dependencies chore: fix & update dependencies Apr 10, 2018
Copy link
Contributor

@DanielRuf DanielRuf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Compiled without any issues and kitchensink works. 👍

@ncoden
Copy link
Contributor Author

ncoden commented Apr 11, 2018

Thanks @DanielRuf for the review. Good to merge. For now dependencies will be kept up-to-date by Dependabot (thx @dependabot)

@ncoden ncoden merged commit b22b5fd into foundation:develop Apr 11, 2018
@ncoden ncoden deleted the chore/update-dependencies branch April 11, 2018 19:44
ncoden added a commit to ncoden/foundation-sites that referenced this pull request Apr 25, 2018
As gulp sequences don't return a stream, a callback must be called when its callback job is done.

Bug was introduced in foundation#11119
ncoden added a commit to ncoden/foundation-sites that referenced this pull request Jun 16, 2018
…es for v6.5.0

201d702 chore: use permissive selector for all compatible dependencies versions
fb33cee chore: switch to
be04444 chore: update all devDependencies to latest versions
dd52875 chore: update dependencies lockfiles
b5c95a8 docs: update required node version to 6.4.0
a14dc5c fix: set basePath for gulp-cache-bust and apply run-sequence
6144786 fix: use callback function in test tasks
2abca4a chore: fix indentation
531b006 chore: migrate more gulp tasks to new run-sequence API
205c352 chore: migrate gulp watch tasks to new run-sequence API
9529392 chore: remove unused devDependencies
d09fbc3 chore: migrate to webpack 4
dce21c1 chore: regenerate yarn/npm lockfiles separately
5d24801 chore: enforce packages resolution via HTTPS
1e10055 chore: update dependencies (10-04-17)

Co-Authored-By: Daniel Ruf <daniel@daniel-ruf.de>
Signed-off-by: Nicolas Coden <nicolas@ncoden.fr>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants