1. 18 Sep, 2018 3 commits
  2. 23 May, 2018 1 commit
    • Graeme's avatar
      Update paths.js, rename shadow path variable (#4435) · 61c864c3
      Graeme authored
      * Update paths.js, rename shadow path variable
      
      This file requires the "path" module and sets it to a variable `path`. The function `ensureSlash` also has a variable `path` that then shadows the `path` module.
      
      * Update paths.js
      61c864c3
  3. 08 May, 2018 1 commit
    • William Chargin's avatar
      ensureSlash: Fix accidental string-to-NaN coercion (#4424) · 3aaddefc
      William Chargin authored
      Summary:
      The `hasSlash` method uses `path.substr(path, path.length - 1)` to
      remove the last character from `path`. Clearly, the first parameter is
      suspect; it should be `0`. The code works as written, but only very
      accidentally: the first parameter is coerced by `ToNumber` to `NaN`,
      which is then coerced by `ToInteger` to `+0`, per [the spec][1].
      
      [1]: https://www.ecma-international.org/ecma-262/6.0/#sec-string.prototype.substr
      
      Test Plan:
      Reading the spec should be sufficient. To verify in the Real World:
      ```js
      const path = "has-slash-but-does-not-need-slash/"
      const a = path.substr(path, path.length - 1);
      const b = path.substr(0, path.length - 1);
      console.log(a === b);  // true
      console.log(a);        // has-slash-but-does-not-need-slash
      ```
      
      wchargin-branch: ensureslash-accidental-coercion
      3aaddefc
  4. 10 Feb, 2018 1 commit
    • bradfordlemley's avatar
      Use yarn when running inside yarn workspace. (#3997) · 2c34d5b6
      bradfordlemley authored
      * Run yarn after ejecting.
      
      * On eject, choose to run yarn instead of npm if yarn is available.
      
      * Move monorepo to react-dev-utils.
      
      * Fix lint.
      
      * Rename monorepo to workspaceUtils.
      
      * Add react-dev-utils dep for create-react-app.
      
      * getMonorepo -> findMonorepo
      2c34d5b6
  5. 07 Feb, 2018 1 commit
    • Ade Viankakrisna Fadlil's avatar
      Ensure workspaces key exists in parent package.json (#3989) · 47d2d941
      Ade Viankakrisna Fadlil authored
      * add default value for globPatterns
      
      without this, the latest alpha broke on start
      ```
      /Users/adeviankakrisnafadlil/Projects/eurecah/node_modules/react-scripts/config/paths.js:130
          .reduce(
           ^
      
      TypeError: Cannot read property 'reduce' of undefined
          at findPkgs (/Users/adeviankakrisnafadlil/Projects/eurecah/node_modules/react-scripts/config/paths.js:130:6)
          at getMonorepoPkgPaths (/Users/adeviankakrisnafadlil/Projects/eurecah/node_modules/react-scripts/config/paths.js:143:22)
          at Object.<anonymous> (/Users/adeviankakrisnafadlil/Projects/eurecah/node_modules/react-scripts/config/paths.js:155:55)
          at Module._compile (module.js:643:30)
          at Object.Module._extensions..js (module.js:654:10)
          at Module.load (module.js:556:32)
          at tryModuleLoad (module.js:499:12)
          at Function.Module._load (module.js:491:3)
          at Module.require (module.js:587:17)
          at require (internal/module.js:11:18)
      error Command failed with exit code 1.
      ```
      
      * also check for pkgPatterns for null
      
      * Update paths.js
      47d2d941
  6. 01 Feb, 2018 1 commit
    • bradfordlemley's avatar
      Add support for yarn and lerna monorepos. (#3741) · b43ad04b
      bradfordlemley authored
      * Support for multiple source paths via package.json srcPaths entry.
      
      Initial support for yarn workspace.
      
      Support lerna workspace, fix for when to use template files.
      
      Remove support for specifying srcPaths in package.json.
      
      Re-enable transpilation caching.
      
      * Clean up, use file matching (similar to original) in webpack configs instead of matching function.
      
      * Remove package lock files.
      
      * Fix for eject.
      Note: monorepos won't work after eject.
      Can be fixed easily with JEST 22.0.?+ which has file pattern matches against realpaths.
      
      * Filter tests to run only tests in monorepo components included by the app.
      (Not sure this is desireable, might be cool to be able to easily run all tests in monorepo from one app.)
      
      * Fix conditions for when to use template.
      
      * Fix eject.
      
      * Remove code that is not needed w/ Jest 22.
      
      * Include all cra-comp tests in monorepo instead of trying to include only tests that are dependencies of app.
      (tests can be easily filtered via jest cli if desired, e.g. 'npm test -- myapp comp1')
      
      * Pin find-pkg version.
      
      * Hopefully fix jest test file matching on windows by removing first slash.
      
      * E2E tests for monorepo.
      
      * Run monorepo tests in CI.
      
      * Fix and test post-eject build.
      
      * Fix e2e test.
      
      * Fix test suite names in appveyor.
      
      * Include individual package dirs as srcPaths instead of top-level monorepo root.
      Fixes build/start after eject.
      
      * Fix running tests after eject.
      
      * Clean up test workspace, add some verifcations.
      
      * Cleanup.
      
      * Try to fix hang when running test on appveyor.
      
      * Don't write babel or lint config to package.json when ejecting.
      
      * Incorporate review comments.
      * Simply monorepo pkg finder
      * Only include monorepo pkgs if app itself is included in monorepo
      * Check for specific tests in e2e
      
      * Fixes for windows.
      
      * Fix for kitchensink mocha tests compiling.
      
      * Add lerna monorepo test.
      
      * Fix lerna bootstrap on windows.
      
      * Incorporate more review comments:
      * remove support for lerna w/o yarn workspace
      * add react and react-dom as devDeps to comp1 and comp2
      
      * Add monorepo info to user guide.
      b43ad04b
  7. 22 Jan, 2018 1 commit
  8. 15 Jan, 2018 1 commit
  9. 26 Sep, 2017 1 commit
  10. 28 Jun, 2017 1 commit
  11. 19 May, 2017 1 commit
  12. 18 May, 2017 1 commit
  13. 12 May, 2017 1 commit
  14. 07 Mar, 2017 1 commit
  15. 06 Mar, 2017 2 commits
  16. 05 Mar, 2017 1 commit
    • Dan Abramov's avatar
      Fix ejecting from a scoped fork (#1727) · 23dc4226
      Dan Abramov authored
      * Read script names from own bin instead of guessing
      
      This fixes ejecting from a fork that uses a different bin script name.
      
      * Fix ejecting for a scoped react-scripts fork
      
      We shouldn't hardcode react-scripts because fork name might differ.
      We also shouldn't rely on it being an immediate child because scoped packages are a level deeper.
      
      * Clarify that own* properties only exist before ejecting
      23dc4226
  17. 24 Feb, 2017 1 commit
    • Valerii Sorokobatko's avatar
      Fix workflow if react-scripts package is linked via npm-link (#1356) · bec009ce
      Valerii Sorokobatko authored
      * add npm-link support
      
      * - remove extra veriable
      - simplify condition
      
      * update code after review:
      - remove utils/isReactScriptsLinked
      - add appPath and ownPath to paths.js (but only for "before eject" export case)
      
      * update code after review:
      - remove utils/isReactScriptsLinked
      - add appPath and ownPath to paths.js (but only for "before eject" export case)
      
      * update code after review:
      - remove utils/isReactScriptsLinked
      - add appPath and ownPath to paths.js (but only for "before eject" export case)
      - remove "if" block for fs.removeSync(ownPath) at ejec.tjs
      
      * change ownPath value
      bec009ce
  18. 10 Feb, 2017 1 commit
    • Joe Haddad's avatar
      Add `PUBLIC_URL` env variable for advanced use (#937) (#1504) · 613b584f
      Joe Haddad authored
      * Add `PUBLIC_URL` env variable for advanced use (#937)
      * Add support for `PUBLIC_URL` env variable
      * Remove unnecessary duplications
      * Simplify served path choice logic
      * Honor PUBLIC_URL in development
      * Add e2e tests
      
      Enables serving static assets from specified host.
      613b584f
  19. 07 Dec, 2016 1 commit
  20. 20 Nov, 2016 1 commit
  21. 17 Nov, 2016 1 commit
    • Ville Immonen's avatar
      Support Yarn (#898) · bcc469c9
      Ville Immonen authored
      In the `create-react-app` command, try to install packages using Yarn.
      If Yarn is not installed, use npm instead.
      
      In `react-scripts`, detect if the project is using Yarn by checking if
      a `yarn.lock` file exists. If the project is using Yarn, display all
      the instructions with Yarn commands and use Yarn to install packages
      in `init` and `eject` scripts.
      bcc469c9
  22. 07 Oct, 2016 1 commit
  23. 22 Sep, 2016 1 commit
  24. 19 Sep, 2016 1 commit
  25. 18 Sep, 2016 1 commit
  26. 16 Sep, 2016 1 commit
  27. 02 Sep, 2016 4 commits
  28. 12 Aug, 2016 1 commit
    • Andrey Popp's avatar
      Load favicon through html-loader. (#428) · 60178ac7
      Andrey Popp authored
      * Load favicon through html-loader.
      
      Fixes #291.
      
      * Add test for *.ico in e2e test suite
      
      * Configure html-loader to process <link href="...">
      
      * Address feedback on html-loader inclusion.
      
      * Place favicon.ico at the root of the build dir
      
      * Make comment style consistent between prod and dev webpack configs
      
      * Fix html-loader config in dev mode
      60178ac7
  29. 29 Jul, 2016 1 commit
    • Dallon Feldner's avatar
      Symlink-friendly path resolution (#277) · d2baa3c4
      Dallon Feldner authored
      * Symlink-friendly path resolution
      
      I was having difficulties using a local copy of `react-scripts` and `npm link`ing it into a real world project. This change resolves paths relative to the current working directory (that is, most likely the directory of the app) rather than assuming a certain directory structure.
      
      * Fix relative paths in post-eject case
      
      because I'm an idiot
      
      * Renamed resolveLib to resolveOwn
      d2baa3c4
  30. 25 Jul, 2016 1 commit