)]}'
{"test/functional/helpers/cloudsYamlPath.js":[{"author":{"_account_id":8614,"name":"Corentin Ardeois","email":"corentin.ardeois@gmail.com","username":"cardeois"},"change_message_id":"13ccfc426ac91bcc132db1768215779e6b963bf1","unresolved":false,"context_lines":[{"line_number":19,"context_line":""},{"line_number":20,"context_line":"const cloudFiles \u003d resolvePaths.filter(fileExists);"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"export default cloudFiles.length \u003e 0 ? path.resolve(cloudFiles[0]) : \u0027clouds.yaml\u0027;"},{"line_number":23,"context_line":""}],"source_content_type":"text/javascript","patch_set":6,"id":"bacf61ea_15a696ad","line":22,"updated":"2016-08-05 15:46:06.000000000","message":"We return \u0027clouds.yaml\u0027 if file is not found for 2 reasons:\n1. Silently ignore if file is not found, as \u0027cloudsYamlPath.js required in unit tests too (webpack config imports it). It\u0027s not possible to do conditional \u0027import\u0027 in ES6, the only way to not require \u0027cloudsYamlPath.js\u0027 for unit tests would be to use \u0027require\u0027 which I\u0027d like to avoid.\n\n2. Display an understandable error message for both Node and Browser. Later when node and webpack try to load the not found file, we\u0027ll have error messages looking like:\n\nNODE:\n\n fs.js:549\n    return binding.open(pathModule._makeLong(path), stringToFlags(flags), mode);\n                   ^\n\n Error: ENOENT: no such file or directory, open \u0027clouds.yaml\u0027\n\n\nBROWSER:\n\n ERROR in ./test/functional/indexTest.js\n Module not found: Error: Cannot resolve module \u0027clouds.yaml\u0027 in /Users/cardeois/devel/openstack/js-openstack-lib/test/functional\n  @ ./test/functional/indexTest.js 7:20-53","commit_id":"cd1ecf6e818893a3ab7a0ef803028a06a93d0e8d"}],"webpack.config.babel.js":[{"author":{"_account_id":8614,"name":"Corentin Ardeois","email":"corentin.ardeois@gmail.com","username":"cardeois"},"change_message_id":"13ccfc426ac91bcc132db1768215779e6b963bf1","unresolved":false,"context_lines":[{"line_number":23,"context_line":"  },"},{"line_number":24,"context_line":"  plugins: ["},{"line_number":25,"context_line":"    new webpack.NormalModuleReplacementPlugin(/helpers\\/cloudsConfig/,"},{"line_number":26,"context_line":"      \u0027json!yaml!\u0027 + cloudsYamlPath)"},{"line_number":27,"context_line":"  ]"},{"line_number":28,"context_line":"};"}],"source_content_type":"text/javascript","patch_set":6,"id":"bacf61ea_f5d822f1","line":26,"updated":"2016-08-05 15:46:06.000000000","message":"When we import \u0027helpers/cloudsConfig\u0027, this replaces the requirement with, for example, \u0027json!yaml!/etc/openstack/clouds.yaml\u0027","commit_id":"cd1ecf6e818893a3ab7a0ef803028a06a93d0e8d"}]}
