1. 01 Oct, 2018 1 commit
    • Maël Nison's avatar
      Plug'n'Play support (#5136) · 9e074bbf
      Maël Nison authored
      * Adds the PnP plugin for Webpack to find dependencies when working under PnP
      
      * Adds configuration for jest
      
      * Adds an e2e test for when using PnP
      
      * Avoids cra from crashing at the engine check
      
      * Avoids cra from crashing when initializing react-scripts
      
      * Makes the ownPath portable
      
      * Fixes linting
      
      * Bumps to pnp-webpack-plugin@1.1.0, removes symlinks: false
      
      * Adds a --use-pnp option
      
      * Pin version
      9e074bbf
  2. 25 Sep, 2018 1 commit
  3. 24 Sep, 2018 2 commits
  4. 18 Sep, 2018 2 commits
  5. 20 May, 2018 1 commit
    • Craig Mulligan's avatar
      `.mjs` should not resolve before .js files (#4085) (#4318) · 0e0f260e
      Craig Mulligan authored
      Support for .mjs files added in #3239 did not account for npm libraries which ship native mjs files alongside js files. This accounts for this by ensuring .js files resolve before their accompanying .mjs file. Note that this is not an ideal end state since selecting a .mjs over a .js extension should be the result of whether `import` was used instead of `require()` in a node environment with native ESM support (currently via `--experimental-modules`). Instead, this change just *always* selects a .js extension before the .mjs extension if it exists.
      
      This unbreaks support for using GraphQL (relay, apollo, etc) within create-react-app projects.
      0e0f260e
  6. 16 May, 2018 1 commit
  7. 22 Mar, 2018 1 commit
    • Lee Byron's avatar
      `.mjs` should not resolve before .js files (#4085) · c6375edc
      Lee Byron authored
      Support for .mjs files added in #3239 did not account for npm libraries which ship native mjs files alongside js files. This accounts for this by ensuring .js files resolve before their accompanying .mjs file. Note that this is not an ideal end state since selecting a .mjs over a .js extension should be the result of whether `import` was used instead of `require()` in a node environment with native ESM support (currently via `--experimental-modules`). Instead, this change just *always* selects a .js extension before the .mjs extension if it exists.
      
      This unbreaks support for using GraphQL (relay, apollo, etc) within create-react-app projects.
      c6375edc
  8. 03 Feb, 2018 1 commit
  9. 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
  10. 17 Jan, 2018 2 commits
    • Ro Savage's avatar
      Add support for CSS Modules with explicit filename (#2285) · fc7c9915
      Ro Savage authored
      * Add css modules with [name].modules.css file convention
      
      * Add e2e for CSS Modules
      
      * Updated based on feedback
      
      * Change css modules class name to be deterministic and fix licences
      
      * Update css modules class naming convention
      fc7c9915
    • Jack Franklin's avatar
      Enhance Jest config error for `setupTestFrameworkScriptFile` (#3512) · 7969b48c
      Jack Franklin authored
      * Enhance Jest config error for `setupTestFrameworkScriptFile`
      
      I wasn't aware of the fact that users of c-r-a could just define
      `src/setupTests.js` and it would be configured with Jest - I nearly
      ejected before I found a GitHub issue that confirmed this functionality.
      
      I thought it might be a nice idea to add it to the error about Jest
      config overrides to stop others ejecting when they don't need to.
      
      * Change the order of Jest config errors.
      
      * Show different error for `setupTestFrameworkScriptFile`
      
      * Tweak the message
      7969b48c
  11. 15 Jan, 2018 2 commits
  12. 28 Oct, 2017 1 commit
  13. 26 Sep, 2017 1 commit
  14. 07 Jul, 2017 1 commit
    • Mostafa Hajizadeh's avatar
      Add "node" to Jest's moduleFileExtensions (#2738) · 16f0d4a5
      Mostafa Hajizadeh authored
      Jest's default value for this option is ["js", "json", "jsx", "node"].
      CRA's current value is ["web.js", "js", "json", "web.jsx", "jsx"], which
      is missing one of default ones: "node". This change fixes that.
      
      This "node" extension is used in packages that use native code.
      16f0d4a5
  15. 28 Jun, 2017 1 commit
  16. 16 May, 2017 2 commits
  17. 15 May, 2017 1 commit
  18. 08 May, 2017 1 commit
  19. 07 Mar, 2017 1 commit
  20. 06 Mar, 2017 1 commit
  21. 04 Mar, 2017 1 commit
    • Daniel Grant's avatar
      Modularise scripts (#1433) · b88d6655
      Daniel Grant authored
      * Refactor start script into modules
      
      * Move dev server config into config file
      
      * Replace eject file whitelist with a "remove-file-on-eject" flag
      
      * Move utils into scripts folder (for inclusion in ejection)
      
      * Add missed changes
      
      * Pass showInstructions as an argument
      
      * Fix eject bug
      
      * Don't eject babelTransform
      b88d6655
  22. 23 Dec, 2016 1 commit
  23. 18 Dec, 2016 1 commit
  24. 08 Dec, 2016 1 commit
  25. 07 Dec, 2016 1 commit
    • Dan Abramov's avatar
      Let Jest handle all file types (#1197) · 5456ffff
      Dan Abramov authored
      * Let Jest handle all file types
      
      * Update regexes
      
      * Fix exclusion regex to also exclude files without extension
      * Be over-cautious with Windows paths because I'm not sure how Jest handles them
      
      * There is no automatic babel-jest discovery now that we use transsform
      5456ffff
  26. 05 Dec, 2016 1 commit
    • Stephen John Sorensen's avatar
      Add testURL to jest config (#1120) · aaa615f6
      Stephen John Sorensen authored
      In my tests, jsdom was throwing a "SecurityError" at HistoryImpl._sharedPushAndReplaceState (node_modules/react-scripts/node_modules/jsdom/lib/jsdom/living/window/History-impl.js:87:15)
      
      This happens because document.URL defaults to "about:blank". Unfortunately, if you interact with the History object it tries and fails to parse the URL, causing a "SecurityError" to be thrown. Setting the default URL to "http://localhost" fixes this issue.
      aaa615f6
  27. 04 Dec, 2016 1 commit
    • Ville Immonen's avatar
      Revert Jest moduleNameMapper regex back to a whitelist (#1149) · 715de0de
      Ville Immonen authored
      Jest matches moduleNameMapper regexes with module names, not the full
      file path, so the negative lookahead doesn’t work for filtering out
      JS files, because they can be imported without the extension. So paths
      like `lodash.assign` and `../utils/range` were mislabeled as resources
      with unknown file extensions because they have a dot in the name.
      
      As a stopgap measure, revert the moduleNameMapper regex added in #1077.
      715de0de
  28. 21 Nov, 2016 2 commits
  29. 28 Oct, 2016 2 commits
  30. 11 Oct, 2016 1 commit
  31. 05 Oct, 2016 1 commit
  32. 23 Sep, 2016 1 commit
  33. 22 Sep, 2016 1 commit