Skip to content

Commit

Permalink
fix: resolve PnP and yarn.lock.cache issues
Browse files Browse the repository at this point in the history
  • Loading branch information
mrmckeb committed Oct 19, 2019
1 parent 923e2cf commit 6998bc6
Show file tree
Hide file tree
Showing 8 changed files with 1,540 additions and 1,420 deletions.
1 change: 1 addition & 0 deletions packages/cra-template-typescript/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"typescript"
],
"description": "The base TypeScript template for Create React App.",
"main": "template.json",
"repository": {
"type": "git",
"url": "https://github.com/facebook/create-react-app.git",
Expand Down
1 change: 1 addition & 0 deletions packages/cra-template/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"template"
],
"description": "The base template for Create React App.",
"main": "template.json",
"repository": {
"type": "git",
"url": "https://github.com/facebook/create-react-app.git",
Expand Down
4 changes: 2 additions & 2 deletions packages/create-react-app/createReactApp.js
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ function createApp(
useTypeScript
) {
const unsupportedNodeVersion = !semver.satisfies(process.version, '>=8.10.0');
if (unsupportedNodeVersion && useTypescript) {
if (unsupportedNodeVersion && useTypeScript) {
console.log(
chalk.red(
`You are using Node ${process.version} with the TypeScript template. Node 8.10 or higher is required to use TypeScript.\n`
Expand Down Expand Up @@ -452,7 +452,7 @@ function run(

// Only support templates when used alongside new react-scripts versions.
const supportsTemplates = semver.gte(
packageVersion,
semver.coerce(packageVersion),
templatesVersionMinimum
);
if (supportsTemplates) {
Expand Down
2 changes: 1 addition & 1 deletion packages/create-react-app/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "create-react-app",
"version": "3.2.0",
"version": "3.3.0-beta",
"keywords": [
"react"
],
Expand Down
2,940 changes: 1,527 additions & 1,413 deletions packages/create-react-app/yarn.lock.cached

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions packages/react-scripts/fixtures/kitchensink/package.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"name": "kitchensink",
"version": "1.0.0"
"name": "kitchensink",
"main": "template.json",
"version": "1.0.0"
}
2 changes: 1 addition & 1 deletion packages/react-scripts/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-scripts",
"version": "3.2.0",
"version": "3.3.0-beta",
"description": "Configuration and scripts for Create React App.",
"repository": {
"type": "git",
Expand Down
5 changes: 4 additions & 1 deletion packages/react-scripts/scripts/init.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,10 @@ module.exports = function(
return;
}

const templatePath = path.join(appPath, 'node_modules', templateName);
const templatePath = path.join(
require.resolve(templateName, { paths: [appPath] }),
'..'
);

// Copy over some of the devDependencies
appPackage.dependencies = appPackage.dependencies || {};
Expand Down

0 comments on commit 6998bc6

Please sign in to comment.