Skip to content

Updating Package Dependencies

Rui Marinho edited this page Mar 4, 2015 · 8 revisions

Updating libphonenumber

Fetch the wanted revision from the googlei18n/libphonenumber repository:

curl -L https://github.com/googlei18n/libphonenumber/archive/libphonenumber-<tag>.tar.gz | tar -xvf - --strip-components=4 -C lib/closure/goog/i18n/phonenumbers --include=*javascript/i18n/phonenumbers*

(Optional) Update the library dependencies (unlikely to change in the foreseeable future):

chmod +x node_modules/seegno-closure-library/closure/bin/build/depswriter.py
node_modules/seegno-closure-library/closure/bin/build/depswriter.py --root_with_prefix="./lib/closure/goog ../../../../lib/closure/goog" | sed -E '/metadatalite|metadatafortesting/d' > ./lib/closure/goog/deps.js

Updating closure-library

This project uses a fork of closure-library that has been published to npm. The package is maintained by Seegno and receives regular updates.

If you absolutely need to update to the latest closure-library version you may have to fork the seegno-closure-library and follow the README's instructions on how to rebase with the upstream repository. This is unlikely to happen because libphonenumber uses a very small and stable set of closure dependences (only string, array, proto2).

Push the changes to your fork and add the following lines to your project's package.json :

"dependencies": {
  "seegno-closure-library": "git://github.com/<username>/closure-library#<commit-sha1,branch,tag>"
}

Run npm install and after a successfull install, the library should pick that version instead.

Alternatively, you may publish your own version of closure-library to npm and use that one instead.

Clone this wiki locally