nodejs/Intl

Discoverability/Modularity of ICU Data File

jasnell opened this issue · 4 comments

One of the key issues around the introduction of Intl support into node has been the bundling of the ICU data file and the use of the command line switch. One of the solutions discussed has been to allow Node to automatically discover the data file location and to use modules as a way of installing / customizing the data file. I have been investigating several options on this and will be using this issue to track the progress.

from some discussions today:

  • have a generic npm package named something like icu4c-data
  • that package has a postinstall step ala node-sass which in turn:
    • does an npm install icu4c-data-${ICUVER}${ENDIANNESS}
    • .. but copies the data file 'up' into ../node_modules/icu4c-data (flat path)
    • emits "Hey, to use this run node --icu-data=node_modules/icu4c-data
    • ... until node can discover that data file by itself (#????)
  • node installer might offer to do an 'npm install -g icu4c-data` on behalf of the user.

^ PoC up at the above issue

Trott commented

Closing due to inactivity. Feel free to pick this up again in nodejs/node#3460 or any other nodejs repo that seems appropraite. This one will probably be read-only soon.