Problem/Motivation

Follow-up to #2859663: Ignore core/node_modules. Should we recommend using yarn and should we check in the yarn.lock file?

Steps to create the yarn.lock file:

  1. Install yarn
  2. cd /core
  3. "yarn install"

Proposed resolution

Check in the resulting yarn.lock file so all javascript developers work of the same version of dependencies.

Remaining tasks

User interface changes

None

API changes

None

Data model changes

None

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

alexpott created an issue. See original summary.

natete’s picture

Assigned: Unassigned » natete
Issue tags: +DevDaysSeville
natete’s picture

I'll be trying to work on it

natete’s picture

natete’s picture

I totally agree, yarn is a huge improvement over plain npm and yarn.lock prevents problems with different versions of the libraries.

agomezmoron’s picture

Status: Active » Needs review

I think it can be closed.

Haza’s picture

Issue summary: View changes
Haza’s picture

To manually check the yarn.lock file, I also followed the steps and generated my own yarn.lock and then performed a md5sum against the one in the patch in #4. They are the same.

I'm not sure if anything still needs to be done (documentation maybe ?), otherwise, I think we could RTBC this one.

agomezmoron’s picture

Hi, I think it is enough because it is like a "yarn basic".

Thanks!

natete’s picture

agomezmoron’s picture

Status: Needs review » Reviewed & tested by the community
droplet’s picture

Assigned: natete » Unassigned

committer should do it himself/herself once and checksum :)

It's too early to add it in my view (as JS Maintainer also). We haven't done any meaningful ES6 stuff to CORE. The JS tools are useless at the moment. When we started ES6, the packages are outdated. I think we will update these packages once before the first ES6 patch.

@natete is finished his job. Unassigned it :)

droplet’s picture

recommend usage of yarn

during the time, we could discuss where & how to document it.

alexpott’s picture

Status: Reviewed & tested by the community » Postponed

Let's go with @droplet's point here and postpone this issue on actually using the build process.

Version: 8.4.x-dev » 8.5.x-dev

Drupal 8.4.0-alpha1 will be released the week of July 31, 2017, which means new developments and disruptive changes should now be targeted against the 8.5.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.5.x-dev » 8.6.x-dev

Drupal 8.5.0-alpha1 will be released the week of January 17, 2018, which means new developments and disruptive changes should now be targeted against the 8.6.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

martin107’s picture

in the proposed section of the issue summary

Check in the resulting yarn.lock file so all javascript developers work of the same version of dependencies

Well that ship has sailed as we have commited a yarn.lock

I think we are in a maintenance phase, where we need to ensure we are keeping up with tool upgrades

in short run

a) yarn outdated,
b) get all packages up to date.
c) rebuild out javascript
d) in patch review get into the messy business of analysing how things are going to break given those changes.


I think this issue could be closed and a second maintenance issue created?

For example here is step a

yarn outdated

yarn outdated v1.3.2
info Color legend : 
 "<red>"    : Major Update backward-incompatible updates 
 "<yellow>" : Minor Update backward-compatible features 
 "<green>"  : Patch Update backward-compatible bug fixes
Package                        Current Wanted Latest Package Type    URL                                                               
babel-core                     6.24.1  6.24.1 6.26.0 devDependencies https://babeljs.io/                                               
babel-preset-env               1.4.0   1.4.0  1.6.1  devDependencies https://babeljs.io/                                               
chalk                          1.1.3   1.1.3  2.3.0  devDependencies https://github.com/chalk/chalk#readme                             
chokidar                       1.6.1   1.6.1  2.0.0  devDependencies https://github.com/paulmillr/chokidar                             
cross-env                      4.0.0   4.0.0  5.1.3  devDependencies https://github.com/kentcdodds/cross-env#readme                    
eslint                         3.19.0  3.19.0 4.16.0 devDependencies https://eslint.org                                                
eslint-config-airbnb           14.1.0  14.1.0 16.1.0 devDependencies https://github.com/airbnb/javascript                              
eslint-plugin-import           2.2.0   2.2.0  2.8.0  devDependencies https://github.com/benmosher/eslint-plugin-import                 
eslint-plugin-jsx-a11y         4.0.0   4.0.0  6.0.3  devDependencies https://github.com/evcohen/eslint-plugin-jsx-a11y#readme          
eslint-plugin-react            6.10.3  6.10.3 7.5.1  devDependencies https://github.com/yannickcr/eslint-plugin-react                  
glob                           7.1.1   7.1.1  7.1.2  devDependencies https://github.com/isaacs/node-glob#readme                        
stylelint                      7.10.1  7.13.0 8.4.0  devDependencies https://stylelint.io                                              
stylelint-checkstyle-formatter 0.1.0   0.1.1  0.1.1  devDependencies https://github.com/stylelint/stylelint-checkstyle-formatter#readme
stylelint-config-standard      16.0.0  16.0.0 18.0.0 devDependencies https://github.com/stylelint/stylelint-config-standard#readme     
stylelint-no-browser-hacks     1.0.2   1.1.0  1.1.0  devDependencies https://github.com/Slamdunk/stylelint-no-browser-hacks   
martin107’s picture

Status: Postponed » Active
alexpott’s picture

Status: Active » Closed (duplicate)

@martin107 you're right. We added the lock file in #2815077: Adopt airbnb javascript style guide v14.1 as new baseline javascript coding standards for Drupal 8 core and contrib so we should close this issue and open a new issue to update outdated dependencies.

martin107’s picture

and open a new issue to update outdated dependencies.

Ok