├── .gitignore ├── .npmignore ├── .prettierrc ├── LICENSE.md ├── README.md ├── index.js ├── package.json └── yarn.lock /.gitignore: -------------------------------------------------------------------------------- 1 | *.swp 2 | *~ 3 | *.iml 4 | .*.haste_cache.* 5 | .DS_Store 6 | .idea 7 | npm-debug.log 8 | node_modules 9 | dist 10 | -------------------------------------------------------------------------------- /.npmignore: -------------------------------------------------------------------------------- 1 | *.swp 2 | *~ 3 | *.iml 4 | .*.haste_cache.* 5 | .DS_Store 6 | .idea 7 | .babelrc 8 | .eslintrc 9 | npm-debug.log 10 | lib 11 | -------------------------------------------------------------------------------- /.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "trailingComma": "es5", 3 | "singleQuote": true 4 | } 5 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2017 Maximilian Stoiber 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # `jscodeshift-graphql-files` 2 | 3 | Transform a `.js` file with GraphQL tagged template literals into `.graphql` files. 4 | 5 | ## Example 6 | 7 | This codemod turns this file: 8 | 9 | ```javascript 10 | // User.js 11 | const User = /* GraphQL */` 12 | type User { 13 | id: ID! 14 | } 15 | ` 16 | ``` 17 | 18 | Into this `.graphql` file: 19 | 20 | ```graphql 21 | # User.graphql 22 | type User { 23 | id: ID! 24 | } 25 | ``` 26 | 27 | > Note: It does so indistructively, it doesn't touch the original `.js` files at all. :warning: It will override an existing User.graphql file though! 28 | 29 | ## Usage 30 | 31 | ```sh 32 | # Clone the repo 33 | git clone git@github.com:withspectrum/jscodeshift-graphql-files 34 | # Install jscodeshift globally 35 | npm i -g jscodeshift 36 | 37 | # Run jscodeshift with the transform on a directory 38 | # Note the --dry option, this means we'll only log which files would be output 39 | jscodeshift -t ./jscodeshift-graphql-files/index.js some-dir-with-graphql-types/ --dry 40 | # If you're happy with the resulting files do a real run without the --dry option! 41 | ``` 42 | 43 | ## License 44 | 45 | Licensed under the MIT License, Copyright ©️ 2017 Maximilian Stoiber. See [LICENSE.md](LICENSE.md) for more information. 46 | -------------------------------------------------------------------------------- /index.js: -------------------------------------------------------------------------------- 1 | const fs = require('fs'); 2 | 3 | // Check if a node has a GraphQL comment 4 | const hasGraphQLComment = node => 5 | node.comments && 6 | node.comments.length > 0 && 7 | node.comments.every( 8 | comment => 9 | comment.value.trim().toLowerCase() === 'graphql' || 10 | comment.value.trim().toLowerCase() === 'gql' 11 | ); 12 | 13 | // Create a GraphQL file with the contents of a node at some path 14 | const createGraphQLFile = (path, node, { dry }) => { 15 | if (node.value.quasis.length > 1) 16 | throw new Error( 17 | `[GraphQL Files] GraphQL Template Literal at line ${node.value.quasis[0] 18 | .loc.start.line} has interpolations, (at line ${node.value.quasis[0].loc 19 | .end.line}?) aborting.` 20 | ); 21 | 22 | const { value: { raw } } = node.value.quasis[0]; 23 | if (dry) { 24 | console.log(`[GraphQL Files] Would create ${path}.`); 25 | return; 26 | } 27 | fs.writeFileSync(path, raw); 28 | }; 29 | 30 | module.exports = (fileInfo, api, options) => { 31 | const { source, path } = fileInfo; 32 | const filePath = path.replace(/\.js$/, '.graphql'); 33 | 34 | // Find all template literals that have a graphql comment 35 | const nodes = api 36 | .jscodeshift(source) 37 | .find('TemplateLiteral', hasGraphQLComment); 38 | 39 | // If there's none, bail out early 40 | if (nodes.length === 0) return; 41 | if (options.dry) { 42 | console.log(`[GraphQL Files] Found GraphQL template literals in ${path}.`); 43 | } 44 | // If there's one, just output it at file.graphql 45 | if (nodes.length === 1) { 46 | nodes.forEach(node => createGraphQLFile(filePath, node, options)); 47 | return; 48 | } 49 | 50 | // If there's multiple we have to output file-0.graphql, file-1.graphql etc 51 | nodes.forEach((node, index) => { 52 | createGraphQLFile( 53 | filePath.replace(/\.graphql$/, `-${index}.graphql`), 54 | node, 55 | options 56 | ); 57 | }); 58 | return; 59 | }; 60 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "jscodeshift-graphql-files", 3 | "version": "1.0.0", 4 | "description": "Transform .js files with GraphQL template literals to .graphql files", 5 | "repository": { 6 | "type": "git", 7 | "url": "https://github.com/withspectrum/jscodeshift-graphql-files.git" 8 | }, 9 | "main": "index.js", 10 | "license": "MIT", 11 | "scripts": { 12 | "precommit": "lint-staged" 13 | }, 14 | "lint-staged": { 15 | "*.js": [ 16 | "prettier --write --single-quote --trailing-comma es5", 17 | "git add" 18 | ] 19 | }, 20 | "devDependencies": { 21 | "husky": "^0.14.3", 22 | "lint-staged": "^4.2.2", 23 | "prettier": "^1.7.0" 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /yarn.lock: -------------------------------------------------------------------------------- 1 | # THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. 2 | # yarn lockfile v1 3 | 4 | 5 | ansi-escapes@^1.0.0: 6 | version "1.4.0" 7 | resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-1.4.0.tgz#d3a8a83b319aa67793662b13e761c7911422306e" 8 | 9 | ansi-regex@^2.0.0: 10 | version "2.1.1" 11 | resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df" 12 | 13 | ansi-regex@^3.0.0: 14 | version "3.0.0" 15 | resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.0.tgz#ed0317c322064f79466c02966bddb605ab37d998" 16 | 17 | ansi-styles@^2.2.1: 18 | version "2.2.1" 19 | resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe" 20 | 21 | ansi-styles@^3.1.0, ansi-styles@^3.2.0: 22 | version "3.2.0" 23 | resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.0.tgz#c159b8d5be0f9e5a6f346dab94f16ce022161b88" 24 | dependencies: 25 | color-convert "^1.9.0" 26 | 27 | app-root-path@^2.0.0: 28 | version "2.0.1" 29 | resolved "https://registry.yarnpkg.com/app-root-path/-/app-root-path-2.0.1.tgz#cd62dcf8e4fd5a417efc664d2e5b10653c651b46" 30 | 31 | argparse@^1.0.7: 32 | version "1.0.9" 33 | resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.9.tgz#73d83bc263f86e97f8cc4f6bae1b0e90a7d22c86" 34 | dependencies: 35 | sprintf-js "~1.0.2" 36 | 37 | balanced-match@^0.4.1: 38 | version "0.4.2" 39 | resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-0.4.2.tgz#cb3f3e3c732dc0f01ee70b403f302e61d7709838" 40 | 41 | brace-expansion@^1.0.0: 42 | version "1.1.7" 43 | resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.7.tgz#3effc3c50e000531fb720eaff80f0ae8ef23cf59" 44 | dependencies: 45 | balanced-match "^0.4.1" 46 | concat-map "0.0.1" 47 | 48 | chalk@^1.0.0, chalk@^1.1.1, chalk@^1.1.3: 49 | version "1.1.3" 50 | resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98" 51 | dependencies: 52 | ansi-styles "^2.2.1" 53 | escape-string-regexp "^1.0.2" 54 | has-ansi "^2.0.0" 55 | strip-ansi "^3.0.0" 56 | supports-color "^2.0.0" 57 | 58 | chalk@^2.0.1, chalk@^2.1.0: 59 | version "2.1.0" 60 | resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.1.0.tgz#ac5becf14fa21b99c6c92ca7a7d7cfd5b17e743e" 61 | dependencies: 62 | ansi-styles "^3.1.0" 63 | escape-string-regexp "^1.0.5" 64 | supports-color "^4.0.0" 65 | 66 | ci-info@^1.0.0: 67 | version "1.0.0" 68 | resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-1.0.0.tgz#dc5285f2b4e251821683681c381c3388f46ec534" 69 | 70 | cli-cursor@^1.0.2: 71 | version "1.0.2" 72 | resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-1.0.2.tgz#64da3f7d56a54412e59794bd62dc35295e8f2987" 73 | dependencies: 74 | restore-cursor "^1.0.1" 75 | 76 | cli-spinners@^0.1.2: 77 | version "0.1.2" 78 | resolved "https://registry.yarnpkg.com/cli-spinners/-/cli-spinners-0.1.2.tgz#bb764d88e185fb9e1e6a2a1f19772318f605e31c" 79 | 80 | cli-truncate@^0.2.1: 81 | version "0.2.1" 82 | resolved "https://registry.yarnpkg.com/cli-truncate/-/cli-truncate-0.2.1.tgz#9f15cfbb0705005369216c626ac7d05ab90dd574" 83 | dependencies: 84 | slice-ansi "0.0.4" 85 | string-width "^1.0.1" 86 | 87 | code-point-at@^1.0.0: 88 | version "1.1.0" 89 | resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77" 90 | 91 | color-convert@^1.9.0: 92 | version "1.9.0" 93 | resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.0.tgz#1accf97dd739b983bf994d56fec8f95853641b7a" 94 | dependencies: 95 | color-name "^1.1.1" 96 | 97 | color-name@^1.1.1: 98 | version "1.1.2" 99 | resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.2.tgz#5c8ab72b64bd2215d617ae9559ebb148475cf98d" 100 | 101 | commander@^2.9.0: 102 | version "2.9.0" 103 | resolved "https://registry.yarnpkg.com/commander/-/commander-2.9.0.tgz#9c99094176e12240cb22d6c5146098400fe0f7d4" 104 | dependencies: 105 | graceful-readlink ">= 1.0.0" 106 | 107 | concat-map@0.0.1: 108 | version "0.0.1" 109 | resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" 110 | 111 | cosmiconfig@^1.1.0: 112 | version "1.1.0" 113 | resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-1.1.0.tgz#0dea0f9804efdfb929fbb1b188e25553ea053d37" 114 | dependencies: 115 | graceful-fs "^4.1.2" 116 | js-yaml "^3.4.3" 117 | minimist "^1.2.0" 118 | object-assign "^4.0.1" 119 | os-homedir "^1.0.1" 120 | parse-json "^2.2.0" 121 | pinkie-promise "^2.0.0" 122 | require-from-string "^1.1.0" 123 | 124 | cross-spawn@^5.0.1: 125 | version "5.1.0" 126 | resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-5.1.0.tgz#e8bd0efee58fcff6f8f94510a0a554bbfa235449" 127 | dependencies: 128 | lru-cache "^4.0.1" 129 | shebang-command "^1.2.0" 130 | which "^1.2.9" 131 | 132 | date-fns@^1.27.2: 133 | version "1.28.4" 134 | resolved "https://registry.yarnpkg.com/date-fns/-/date-fns-1.28.4.tgz#7938aec34ba31fc8bd134d2344bc2e0bbfd95165" 135 | 136 | elegant-spinner@^1.0.1: 137 | version "1.0.1" 138 | resolved "https://registry.yarnpkg.com/elegant-spinner/-/elegant-spinner-1.0.1.tgz#db043521c95d7e303fd8f345bedc3349cfb0729e" 139 | 140 | error-ex@^1.2.0: 141 | version "1.3.1" 142 | resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.1.tgz#f855a86ce61adc4e8621c3cda21e7a7612c3a8dc" 143 | dependencies: 144 | is-arrayish "^0.2.1" 145 | 146 | escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.5: 147 | version "1.0.5" 148 | resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" 149 | 150 | esprima@^3.1.1: 151 | version "3.1.3" 152 | resolved "https://registry.yarnpkg.com/esprima/-/esprima-3.1.3.tgz#fdca51cee6133895e3c88d535ce49dbff62a4633" 153 | 154 | execa@^0.8.0: 155 | version "0.8.0" 156 | resolved "https://registry.yarnpkg.com/execa/-/execa-0.8.0.tgz#d8d76bbc1b55217ed190fd6dd49d3c774ecfc8da" 157 | dependencies: 158 | cross-spawn "^5.0.1" 159 | get-stream "^3.0.0" 160 | is-stream "^1.1.0" 161 | npm-run-path "^2.0.0" 162 | p-finally "^1.0.0" 163 | signal-exit "^3.0.0" 164 | strip-eof "^1.0.0" 165 | 166 | exit-hook@^1.0.0: 167 | version "1.1.1" 168 | resolved "https://registry.yarnpkg.com/exit-hook/-/exit-hook-1.1.1.tgz#f05ca233b48c05d54fff07765df8507e95c02ff8" 169 | 170 | figures@^1.7.0: 171 | version "1.7.0" 172 | resolved "https://registry.yarnpkg.com/figures/-/figures-1.7.0.tgz#cbe1e3affcf1cd44b80cadfed28dc793a9701d2e" 173 | dependencies: 174 | escape-string-regexp "^1.0.5" 175 | object-assign "^4.1.0" 176 | 177 | get-own-enumerable-property-symbols@^1.0.1: 178 | version "1.0.1" 179 | resolved "https://registry.yarnpkg.com/get-own-enumerable-property-symbols/-/get-own-enumerable-property-symbols-1.0.1.tgz#f1d4e3ad1402e039898e56d1e9b9aa924c26e484" 180 | 181 | get-stream@^3.0.0: 182 | version "3.0.0" 183 | resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-3.0.0.tgz#8e943d1358dc37555054ecbe2edb05aa174ede14" 184 | 185 | graceful-fs@^4.1.2: 186 | version "4.1.11" 187 | resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.11.tgz#0e8bdfe4d1ddb8854d64e04ea7c00e2a026e5658" 188 | 189 | "graceful-readlink@>= 1.0.0": 190 | version "1.0.1" 191 | resolved "https://registry.yarnpkg.com/graceful-readlink/-/graceful-readlink-1.0.1.tgz#4cafad76bc62f02fa039b2f94e9a3dd3a391a725" 192 | 193 | has-ansi@^2.0.0: 194 | version "2.0.0" 195 | resolved "https://registry.yarnpkg.com/has-ansi/-/has-ansi-2.0.0.tgz#34f5049ce1ecdf2b0649af3ef24e45ed35416d91" 196 | dependencies: 197 | ansi-regex "^2.0.0" 198 | 199 | has-flag@^2.0.0: 200 | version "2.0.0" 201 | resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-2.0.0.tgz#e8207af1cc7b30d446cc70b734b5e8be18f88d51" 202 | 203 | husky@^0.14.3: 204 | version "0.14.3" 205 | resolved "https://registry.yarnpkg.com/husky/-/husky-0.14.3.tgz#c69ed74e2d2779769a17ba8399b54ce0b63c12c3" 206 | dependencies: 207 | is-ci "^1.0.10" 208 | normalize-path "^1.0.0" 209 | strip-indent "^2.0.0" 210 | 211 | indent-string@^2.1.0: 212 | version "2.1.0" 213 | resolved "https://registry.yarnpkg.com/indent-string/-/indent-string-2.1.0.tgz#8e2d48348742121b4a8218b7a137e9a52049dc80" 214 | dependencies: 215 | repeating "^2.0.0" 216 | 217 | indent-string@^3.0.0: 218 | version "3.1.0" 219 | resolved "https://registry.yarnpkg.com/indent-string/-/indent-string-3.1.0.tgz#08ff4334603388399b329e6b9538dc7a3cf5de7d" 220 | 221 | is-arrayish@^0.2.1: 222 | version "0.2.1" 223 | resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" 224 | 225 | is-ci@^1.0.10: 226 | version "1.0.10" 227 | resolved "https://registry.yarnpkg.com/is-ci/-/is-ci-1.0.10.tgz#f739336b2632365061a9d48270cd56ae3369318e" 228 | dependencies: 229 | ci-info "^1.0.0" 230 | 231 | is-extglob@^2.1.1: 232 | version "2.1.1" 233 | resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" 234 | 235 | is-finite@^1.0.0: 236 | version "1.0.2" 237 | resolved "https://registry.yarnpkg.com/is-finite/-/is-finite-1.0.2.tgz#cc6677695602be550ef11e8b4aa6305342b6d0aa" 238 | dependencies: 239 | number-is-nan "^1.0.0" 240 | 241 | is-fullwidth-code-point@^1.0.0: 242 | version "1.0.0" 243 | resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz#ef9e31386f031a7f0d643af82fde50c457ef00cb" 244 | dependencies: 245 | number-is-nan "^1.0.0" 246 | 247 | is-glob@^4.0.0: 248 | version "4.0.0" 249 | resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.0.tgz#9521c76845cc2610a85203ddf080a958c2ffabc0" 250 | dependencies: 251 | is-extglob "^2.1.1" 252 | 253 | is-obj@^1.0.1: 254 | version "1.0.1" 255 | resolved "https://registry.yarnpkg.com/is-obj/-/is-obj-1.0.1.tgz#3e4729ac1f5fde025cd7d83a896dab9f4f67db0f" 256 | 257 | is-promise@^2.1.0: 258 | version "2.1.0" 259 | resolved "https://registry.yarnpkg.com/is-promise/-/is-promise-2.1.0.tgz#79a2a9ece7f096e80f36d2b2f3bc16c1ff4bf3fa" 260 | 261 | is-regexp@^1.0.0: 262 | version "1.0.0" 263 | resolved "https://registry.yarnpkg.com/is-regexp/-/is-regexp-1.0.0.tgz#fd2d883545c46bac5a633e7b9a09e87fa2cb5069" 264 | 265 | is-stream@^1.1.0: 266 | version "1.1.0" 267 | resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-1.1.0.tgz#12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44" 268 | 269 | isexe@^2.0.0: 270 | version "2.0.0" 271 | resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" 272 | 273 | jest-get-type@^21.0.2: 274 | version "21.0.2" 275 | resolved "https://registry.yarnpkg.com/jest-get-type/-/jest-get-type-21.0.2.tgz#304e6b816dd33cd1f47aba0597bcad258a509fc6" 276 | 277 | jest-validate@^21.1.0: 278 | version "21.1.0" 279 | resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-21.1.0.tgz#39d01115544a758bce49f221a5fcbb24ebdecc65" 280 | dependencies: 281 | chalk "^2.0.1" 282 | jest-get-type "^21.0.2" 283 | leven "^2.1.0" 284 | pretty-format "^21.1.0" 285 | 286 | js-yaml@^3.4.3: 287 | version "3.8.3" 288 | resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.8.3.tgz#33a05ec481c850c8875929166fe1beb61c728766" 289 | dependencies: 290 | argparse "^1.0.7" 291 | esprima "^3.1.1" 292 | 293 | leven@^2.1.0: 294 | version "2.1.0" 295 | resolved "https://registry.yarnpkg.com/leven/-/leven-2.1.0.tgz#c2e7a9f772094dee9d34202ae8acce4687875580" 296 | 297 | lint-staged@^4.2.2: 298 | version "4.2.2" 299 | resolved "https://registry.yarnpkg.com/lint-staged/-/lint-staged-4.2.2.tgz#a308ceb3f1031b78c832fbe4570744b3c7fd5a4e" 300 | dependencies: 301 | app-root-path "^2.0.0" 302 | chalk "^2.1.0" 303 | cosmiconfig "^1.1.0" 304 | execa "^0.8.0" 305 | is-glob "^4.0.0" 306 | jest-validate "^21.1.0" 307 | listr "^0.12.0" 308 | lodash "^4.17.4" 309 | log-symbols "^2.0.0" 310 | minimatch "^3.0.0" 311 | npm-which "^3.0.1" 312 | p-map "^1.1.1" 313 | staged-git-files "0.0.4" 314 | stringify-object "^3.2.0" 315 | 316 | listr-silent-renderer@^1.1.1: 317 | version "1.1.1" 318 | resolved "https://registry.yarnpkg.com/listr-silent-renderer/-/listr-silent-renderer-1.1.1.tgz#924b5a3757153770bf1a8e3fbf74b8bbf3f9242e" 319 | 320 | listr-update-renderer@^0.2.0: 321 | version "0.2.0" 322 | resolved "https://registry.yarnpkg.com/listr-update-renderer/-/listr-update-renderer-0.2.0.tgz#ca80e1779b4e70266807e8eed1ad6abe398550f9" 323 | dependencies: 324 | chalk "^1.1.3" 325 | cli-truncate "^0.2.1" 326 | elegant-spinner "^1.0.1" 327 | figures "^1.7.0" 328 | indent-string "^3.0.0" 329 | log-symbols "^1.0.2" 330 | log-update "^1.0.2" 331 | strip-ansi "^3.0.1" 332 | 333 | listr-verbose-renderer@^0.4.0: 334 | version "0.4.0" 335 | resolved "https://registry.yarnpkg.com/listr-verbose-renderer/-/listr-verbose-renderer-0.4.0.tgz#44dc01bb0c34a03c572154d4d08cde9b1dc5620f" 336 | dependencies: 337 | chalk "^1.1.3" 338 | cli-cursor "^1.0.2" 339 | date-fns "^1.27.2" 340 | figures "^1.7.0" 341 | 342 | listr@^0.12.0: 343 | version "0.12.0" 344 | resolved "https://registry.yarnpkg.com/listr/-/listr-0.12.0.tgz#6bce2c0f5603fa49580ea17cd6a00cc0e5fa451a" 345 | dependencies: 346 | chalk "^1.1.3" 347 | cli-truncate "^0.2.1" 348 | figures "^1.7.0" 349 | indent-string "^2.1.0" 350 | is-promise "^2.1.0" 351 | is-stream "^1.1.0" 352 | listr-silent-renderer "^1.1.1" 353 | listr-update-renderer "^0.2.0" 354 | listr-verbose-renderer "^0.4.0" 355 | log-symbols "^1.0.2" 356 | log-update "^1.0.2" 357 | ora "^0.2.3" 358 | p-map "^1.1.1" 359 | rxjs "^5.0.0-beta.11" 360 | stream-to-observable "^0.1.0" 361 | strip-ansi "^3.0.1" 362 | 363 | lodash@^4.17.4: 364 | version "4.17.4" 365 | resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.4.tgz#78203a4d1c328ae1d86dca6460e369b57f4055ae" 366 | 367 | log-symbols@^1.0.2: 368 | version "1.0.2" 369 | resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-1.0.2.tgz#376ff7b58ea3086a0f09facc74617eca501e1a18" 370 | dependencies: 371 | chalk "^1.0.0" 372 | 373 | log-symbols@^2.0.0: 374 | version "2.0.0" 375 | resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-2.0.0.tgz#595e63be4d5c8cbf294a9e09e0d5629f5913fc0c" 376 | dependencies: 377 | chalk "^2.0.1" 378 | 379 | log-update@^1.0.2: 380 | version "1.0.2" 381 | resolved "https://registry.yarnpkg.com/log-update/-/log-update-1.0.2.tgz#19929f64c4093d2d2e7075a1dad8af59c296b8d1" 382 | dependencies: 383 | ansi-escapes "^1.0.0" 384 | cli-cursor "^1.0.2" 385 | 386 | lru-cache@^4.0.1: 387 | version "4.0.2" 388 | resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-4.0.2.tgz#1d17679c069cda5d040991a09dbc2c0db377e55e" 389 | dependencies: 390 | pseudomap "^1.0.1" 391 | yallist "^2.0.0" 392 | 393 | minimatch@^3.0.0: 394 | version "3.0.3" 395 | resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.3.tgz#2a4e4090b96b2db06a9d7df01055a62a77c9b774" 396 | dependencies: 397 | brace-expansion "^1.0.0" 398 | 399 | minimist@^1.2.0: 400 | version "1.2.0" 401 | resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284" 402 | 403 | normalize-path@^1.0.0: 404 | version "1.0.0" 405 | resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-1.0.0.tgz#32d0e472f91ff345701c15a8311018d3b0a90379" 406 | 407 | npm-path@^2.0.2: 408 | version "2.0.3" 409 | resolved "https://registry.yarnpkg.com/npm-path/-/npm-path-2.0.3.tgz#15cff4e1c89a38da77f56f6055b24f975dfb2bbe" 410 | dependencies: 411 | which "^1.2.10" 412 | 413 | npm-run-path@^2.0.0: 414 | version "2.0.2" 415 | resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-2.0.2.tgz#35a9232dfa35d7067b4cb2ddf2357b1871536c5f" 416 | dependencies: 417 | path-key "^2.0.0" 418 | 419 | npm-which@^3.0.1: 420 | version "3.0.1" 421 | resolved "https://registry.yarnpkg.com/npm-which/-/npm-which-3.0.1.tgz#9225f26ec3a285c209cae67c3b11a6b4ab7140aa" 422 | dependencies: 423 | commander "^2.9.0" 424 | npm-path "^2.0.2" 425 | which "^1.2.10" 426 | 427 | number-is-nan@^1.0.0: 428 | version "1.0.1" 429 | resolved "https://registry.yarnpkg.com/number-is-nan/-/number-is-nan-1.0.1.tgz#097b602b53422a522c1afb8790318336941a011d" 430 | 431 | object-assign@^4.0.1, object-assign@^4.1.0: 432 | version "4.1.1" 433 | resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" 434 | 435 | onetime@^1.0.0: 436 | version "1.1.0" 437 | resolved "https://registry.yarnpkg.com/onetime/-/onetime-1.1.0.tgz#a1f7838f8314c516f05ecefcbc4ccfe04b4ed789" 438 | 439 | ora@^0.2.3: 440 | version "0.2.3" 441 | resolved "https://registry.yarnpkg.com/ora/-/ora-0.2.3.tgz#37527d220adcd53c39b73571d754156d5db657a4" 442 | dependencies: 443 | chalk "^1.1.1" 444 | cli-cursor "^1.0.2" 445 | cli-spinners "^0.1.2" 446 | object-assign "^4.0.1" 447 | 448 | os-homedir@^1.0.1: 449 | version "1.0.2" 450 | resolved "https://registry.yarnpkg.com/os-homedir/-/os-homedir-1.0.2.tgz#ffbc4988336e0e833de0c168c7ef152121aa7fb3" 451 | 452 | p-finally@^1.0.0: 453 | version "1.0.0" 454 | resolved "https://registry.yarnpkg.com/p-finally/-/p-finally-1.0.0.tgz#3fbcfb15b899a44123b34b6dcc18b724336a2cae" 455 | 456 | p-map@^1.1.1: 457 | version "1.1.1" 458 | resolved "https://registry.yarnpkg.com/p-map/-/p-map-1.1.1.tgz#05f5e4ae97a068371bc2a5cc86bfbdbc19c4ae7a" 459 | 460 | parse-json@^2.2.0: 461 | version "2.2.0" 462 | resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-2.2.0.tgz#f480f40434ef80741f8469099f8dea18f55a4dc9" 463 | dependencies: 464 | error-ex "^1.2.0" 465 | 466 | path-key@^2.0.0: 467 | version "2.0.1" 468 | resolved "https://registry.yarnpkg.com/path-key/-/path-key-2.0.1.tgz#411cadb574c5a140d3a4b1910d40d80cc9f40b40" 469 | 470 | pinkie-promise@^2.0.0: 471 | version "2.0.1" 472 | resolved "https://registry.yarnpkg.com/pinkie-promise/-/pinkie-promise-2.0.1.tgz#2135d6dfa7a358c069ac9b178776288228450ffa" 473 | dependencies: 474 | pinkie "^2.0.0" 475 | 476 | pinkie@^2.0.0: 477 | version "2.0.4" 478 | resolved "https://registry.yarnpkg.com/pinkie/-/pinkie-2.0.4.tgz#72556b80cfa0d48a974e80e77248e80ed4f7f870" 479 | 480 | prettier@^1.7.0: 481 | version "1.7.0" 482 | resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.7.0.tgz#47481588f41f7c90f63938feb202ac82554e7150" 483 | 484 | pretty-format@^21.1.0: 485 | version "21.1.0" 486 | resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-21.1.0.tgz#557428254323832ee8b7c971cb613442bea67f61" 487 | dependencies: 488 | ansi-regex "^3.0.0" 489 | ansi-styles "^3.2.0" 490 | 491 | pseudomap@^1.0.1: 492 | version "1.0.2" 493 | resolved "https://registry.yarnpkg.com/pseudomap/-/pseudomap-1.0.2.tgz#f052a28da70e618917ef0a8ac34c1ae5a68286b3" 494 | 495 | repeating@^2.0.0: 496 | version "2.0.1" 497 | resolved "https://registry.yarnpkg.com/repeating/-/repeating-2.0.1.tgz#5214c53a926d3552707527fbab415dbc08d06dda" 498 | dependencies: 499 | is-finite "^1.0.0" 500 | 501 | require-from-string@^1.1.0: 502 | version "1.2.1" 503 | resolved "https://registry.yarnpkg.com/require-from-string/-/require-from-string-1.2.1.tgz#529c9ccef27380adfec9a2f965b649bbee636418" 504 | 505 | restore-cursor@^1.0.1: 506 | version "1.0.1" 507 | resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-1.0.1.tgz#34661f46886327fed2991479152252df92daa541" 508 | dependencies: 509 | exit-hook "^1.0.0" 510 | onetime "^1.0.0" 511 | 512 | rxjs@^5.0.0-beta.11: 513 | version "5.3.1" 514 | resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-5.3.1.tgz#9ecc9e722247e4f4490d30a878577a3740fd0cb7" 515 | dependencies: 516 | symbol-observable "^1.0.1" 517 | 518 | shebang-command@^1.2.0: 519 | version "1.2.0" 520 | resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-1.2.0.tgz#44aac65b695b03398968c39f363fee5deafdf1ea" 521 | dependencies: 522 | shebang-regex "^1.0.0" 523 | 524 | shebang-regex@^1.0.0: 525 | version "1.0.0" 526 | resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-1.0.0.tgz#da42f49740c0b42db2ca9728571cb190c98efea3" 527 | 528 | signal-exit@^3.0.0: 529 | version "3.0.2" 530 | resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.2.tgz#b5fdc08f1287ea1178628e415e25132b73646c6d" 531 | 532 | slice-ansi@0.0.4: 533 | version "0.0.4" 534 | resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-0.0.4.tgz#edbf8903f66f7ce2f8eafd6ceed65e264c831b35" 535 | 536 | sprintf-js@~1.0.2: 537 | version "1.0.3" 538 | resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" 539 | 540 | staged-git-files@0.0.4: 541 | version "0.0.4" 542 | resolved "https://registry.yarnpkg.com/staged-git-files/-/staged-git-files-0.0.4.tgz#d797e1b551ca7a639dec0237dc6eb4bb9be17d35" 543 | 544 | stream-to-observable@^0.1.0: 545 | version "0.1.0" 546 | resolved "https://registry.yarnpkg.com/stream-to-observable/-/stream-to-observable-0.1.0.tgz#45bf1d9f2d7dc09bed81f1c307c430e68b84cffe" 547 | 548 | string-width@^1.0.1: 549 | version "1.0.2" 550 | resolved "https://registry.yarnpkg.com/string-width/-/string-width-1.0.2.tgz#118bdf5b8cdc51a2a7e70d211e07e2b0b9b107d3" 551 | dependencies: 552 | code-point-at "^1.0.0" 553 | is-fullwidth-code-point "^1.0.0" 554 | strip-ansi "^3.0.0" 555 | 556 | stringify-object@^3.2.0: 557 | version "3.2.0" 558 | resolved "https://registry.yarnpkg.com/stringify-object/-/stringify-object-3.2.0.tgz#94370a135e41bc048358813bf99481f1315c6aa6" 559 | dependencies: 560 | get-own-enumerable-property-symbols "^1.0.1" 561 | is-obj "^1.0.1" 562 | is-regexp "^1.0.0" 563 | 564 | strip-ansi@^3.0.0, strip-ansi@^3.0.1: 565 | version "3.0.1" 566 | resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf" 567 | dependencies: 568 | ansi-regex "^2.0.0" 569 | 570 | strip-eof@^1.0.0: 571 | version "1.0.0" 572 | resolved "https://registry.yarnpkg.com/strip-eof/-/strip-eof-1.0.0.tgz#bb43ff5598a6eb05d89b59fcd129c983313606bf" 573 | 574 | strip-indent@^2.0.0: 575 | version "2.0.0" 576 | resolved "https://registry.yarnpkg.com/strip-indent/-/strip-indent-2.0.0.tgz#5ef8db295d01e6ed6cbf7aab96998d7822527b68" 577 | 578 | supports-color@^2.0.0: 579 | version "2.0.0" 580 | resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7" 581 | 582 | supports-color@^4.0.0: 583 | version "4.4.0" 584 | resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-4.4.0.tgz#883f7ddabc165142b2a61427f3352ded195d1a3e" 585 | dependencies: 586 | has-flag "^2.0.0" 587 | 588 | symbol-observable@^1.0.1: 589 | version "1.0.4" 590 | resolved "https://registry.yarnpkg.com/symbol-observable/-/symbol-observable-1.0.4.tgz#29bf615d4aa7121bdd898b22d4b3f9bc4e2aa03d" 591 | 592 | which@^1.2.10, which@^1.2.9: 593 | version "1.2.14" 594 | resolved "https://registry.yarnpkg.com/which/-/which-1.2.14.tgz#9a87c4378f03e827cecaf1acdf56c736c01c14e5" 595 | dependencies: 596 | isexe "^2.0.0" 597 | 598 | yallist@^2.0.0: 599 | version "2.1.2" 600 | resolved "https://registry.yarnpkg.com/yallist/-/yallist-2.1.2.tgz#1c11f9218f076089a47dd512f93c6699a6a81d52" 601 | --------------------------------------------------------------------------------