Skip to content

[#149573905] Release/1.2 #5

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Sep 5, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions packages/react-scripts/config/jest/babelTransform.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,6 @@ module.exports = babelJest.createTransformer({
}
}],
"css-modules-transform",
// [require.resolve('babel-plugin-react-intl'), {
// messagesDir: './build/messages/',
// // enforceDescriptions: true,
// extractSourceLocation: true,
// }],
'transform-function-bind',
['transform-decorators-legacy']
],
Expand Down
64 changes: 13 additions & 51 deletions packages/react-scripts/config/paths.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,15 @@ const resolveApp = relativePath => path.resolve(appDirectory, relativePath);

const envPublicUrl = process.env.PUBLIC_URL;

// use realpathSync to resolve symbolic links in path, when asiago is installed using `npm link asiago`
const asiagoLocation = fs.existsSync(resolveApp('node_modules/@brickwork-software/asiago'))
? resolveApp('node_modules/@brickwork-software/asiago')
: resolveApp('..');
const asiagoDirectory = fs.realpathSync(asiagoLocation)
const asiagoNodeModules = path.resolve(asiagoDirectory, 'node_modules')

const resolveOwn = relativePath => path.resolve(__dirname, '..', relativePath);

function ensureSlash(path, needsSlash) {
const hasSlash = path.endsWith('/');
if (hasSlash && !needsSlash) {
Expand Down Expand Up @@ -55,66 +64,19 @@ module.exports = {
appPublic: resolveApp('public'),
appHtml: resolveApp('public/index.html'),
appIndexJs: resolveApp('src/index.js'),
asiagoPath: asiagoDirectory,
asiagoNodeModules: asiagoNodeModules,
appPackageJson: resolveApp('package.json'),
appSrc: resolveApp('src'),
appPath: appDirectory,
yarnLockFile: resolveApp('yarn.lock'),
testsSetup: resolveApp('src/setupTests.js'),
appNodeModules: resolveApp('node_modules'),
publicUrl: getPublicUrl(resolveApp('package.json')),
servedPath: getServedPath(resolveApp('package.json')),
};

// @remove-on-eject-begin
const resolveOwn = relativePath => path.resolve(__dirname, '..', relativePath);

// config before eject: we're in ./node_modules/react-scripts/config/
module.exports = {
dotenv: resolveApp('.env'),
appPath: resolveApp('.'),
appBuild: resolveApp('build'),
appPublic: resolveApp('public'),
appHtml: resolveApp('public/index.html'),
appIndexJs: resolveApp('src/index.js'),
appPackageJson: resolveApp('package.json'),
appSrc: resolveApp('src'),
yarnLockFile: resolveApp('yarn.lock'),
testsSetup: resolveApp('src/setupTests.js'),
appNodeModules: resolveApp('node_modules'),
publicUrl: getPublicUrl(resolveApp('package.json')),
servedPath: getServedPath(resolveApp('package.json')),
// These properties only exist before ejecting:
ownPath: resolveOwn('.'),
ownNodeModules: resolveOwn('node_modules'), // This is empty on npm 3
};

const ownPackageJson = require('../package.json');
const reactScriptsPath = resolveApp(`node_modules/${ownPackageJson.name}`);
const reactScriptsLinked =
fs.existsSync(reactScriptsPath) &&
fs.lstatSync(reactScriptsPath).isSymbolicLink();

// config before publish: we're in ./packages/react-scripts/config/
if (
!reactScriptsLinked &&
__dirname.indexOf(path.join('packages', 'react-scripts', 'config')) !== -1
) {
module.exports = {
dotenv: resolveOwn('template/.env'),
appPath: resolveApp('.'),
appBuild: resolveOwn('../../build'),
appPublic: resolveOwn('template/public'),
appHtml: resolveOwn('template/public/index.html'),
appIndexJs: resolveOwn('template/src/index.js'),
appPackageJson: resolveOwn('package.json'),
appSrc: resolveOwn('template/src'),
yarnLockFile: resolveOwn('template/yarn.lock'),
testsSetup: resolveOwn('template/src/setupTests.js'),
appNodeModules: resolveOwn('node_modules'),
publicUrl: getPublicUrl(resolveOwn('package.json')),
servedPath: getServedPath(resolveOwn('package.json')),
// These properties only exist before ejecting:
ownPath: resolveOwn('.'),
ownNodeModules: resolveOwn('node_modules'),
};
}
// @remove-on-eject-end
// Keep these empty lines to make the diff easy to read
2 changes: 1 addition & 1 deletion packages/react-scripts/config/webpack.config.dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,8 @@ module.exports = {
// https://github.com/facebookincubator/create-react-app/issues/253
modules: [
paths.appPath,
// paths.appNodeModules,
path.resolve(paths.asiagoPath),
paths.asiagoNodeModules,
'node_modules',
].concat(
// It is guaranteed to exist because we tweak it in `env.js`
Expand Down
27 changes: 14 additions & 13 deletions packages/react-scripts/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@brickwork-software/react-scripts",
"version": "1.2.2",
"version": "1.2.3",
"description": "Configuration and scripts for Brickwork react apps",
"repository": "brickworksoftware/create-react-app",
"license": "BSD-3-Clause",
Expand All @@ -25,13 +25,14 @@
"babel-core": "6.25.0",
"babel-eslint": "7.2.3",
"babel-jest": "20.0.3",
"babel-loader": "7.0.0",
"babel-loader": "7.1.1",
"babel-plugin-css-modules-transform": "^1.2.7",
"babel-plugin-module-resolver": "^2.7.1",
"babel-plugin-react-intl": "^2.3.1",
"babel-plugin-transform-decorators-legacy": "^1.3.4",
"babel-plugin-transform-function-bind": "^6.22.0",
"babel-preset-react-app": "^3.0.0",
"babel-runtime": "6.23.0",
"babel-preset-react-app": "^3.0.2",
"babel-runtime": "6.26.0",
"case-sensitive-paths-webpack-plugin": "2.1.1",
"chalk": "1.1.3",
"css-loader": "0.28.4",
Expand All @@ -46,24 +47,24 @@
"extract-text-webpack-plugin": "3.0.0",
"file-loader": "0.11.2",
"fs-extra": "3.0.1",
"html-webpack-plugin": "2.28.0",
"html-webpack-plugin": "2.29.0",
"identity-obj-proxy": "^3.0.0",
"jest": "20.0.4",
"node-sass": "^4.5.3",
"object-assign": "4.1.1",
"postcss-flexbugs-fixes": "3.2.0",
"postcss-loader": "2.0.6",
"promise": "7.1.1",
"react-dev-utils": "^3.0.0",
"promise": "8.0.1",
"react-dev-utils": "^4.0.0",
"react-error-overlay": "^1.0.7",
"sass-loader": "^6.0.6",
"style-loader": "0.17.0",
"sw-precache-webpack-plugin": "0.9.1",
"url-loader": "0.5.8",
"webpack": "2.6.1",
"style-loader": "0.18.0",
"sw-precache-webpack-plugin": "0.11.4",
"url-loader": "0.5.9",
"webpack": "3.5.1",
"webpack-bundle-analyzer": "^2.8.2",
"webpack-dev-server": "2.4.5",
"webpack-manifest-plugin": "1.1.0",
"webpack-dev-server": "2.7.1",
"webpack-manifest-plugin": "1.2.1",
"whatwg-fetch": "2.0.3"
},
"devDependencies": {
Expand Down
50 changes: 23 additions & 27 deletions packages/react-scripts/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ ansi-styles@^3.0.0:
dependencies:
color-convert "^1.0.0"

ansi-styles@^3.1.0, ansi-styles@^3.2.0:
ansi-styles@^3.1.0:
version "3.2.0"
resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.0.tgz#c159b8d5be0f9e5a6f346dab94f16ce022161b88"
dependencies:
Expand Down Expand Up @@ -1538,6 +1538,10 @@ [email protected], commander@^2.9.0, commander@~2.9.0:
dependencies:
graceful-readlink ">= 1.0.0"

commander@~2.11.0:
version "2.11.0"
resolved "https://registry.yarnpkg.com/commander/-/commander-2.11.0.tgz#157152fd1e7a6c8d98a5b715cf376df928004563"

commondir@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/commondir/-/commondir-1.0.1.tgz#ddd800da0c66127393cca5950ea968a3aaf1253b"
Expand Down Expand Up @@ -3148,9 +3152,9 @@ html-minifier@^3.2.3:
relateurl "0.2.x"
uglify-js "3.0.x"

html-webpack-plugin@2.28.0:
version "2.28.0"
resolved "https://registry.yarnpkg.com/html-webpack-plugin/-/html-webpack-plugin-2.28.0.tgz#2e7863b57e5fd48fe263303e2ffc934c3064d009"
html-webpack-plugin@2.29.0:
version "2.29.0"
resolved "https://registry.yarnpkg.com/html-webpack-plugin/-/html-webpack-plugin-2.29.0.tgz#e987f421853d3b6938c8c4c8171842e5fd17af23"
dependencies:
bluebird "^3.4.7"
html-minifier "^3.2.3"
Expand Down Expand Up @@ -3877,7 +3881,7 @@ js-yaml@^3.4.3, js-yaml@^3.7.0:
argparse "^1.0.7"
esprima "^3.1.1"

js-yaml@^3.5.2, js-yaml@^3.9.1:
js-yaml@^3.9.1:
version "3.9.1"
resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.9.1.tgz#08775cebdfdd359209f0d2acd383c8f86a6904a0"
dependencies:
Expand Down Expand Up @@ -5481,15 +5485,6 @@ react-error-overlay@^2.0.0:
settle-promise "1.0.0"
source-map "0.5.6"

react-intl-translations-manager@^5.0.0:
version "5.0.0"
resolved "https://registry.yarnpkg.com/react-intl-translations-manager/-/react-intl-translations-manager-5.0.0.tgz#3c78d3e3e44c5804d7a15c60e89c3aefd9d06615"
dependencies:
chalk "^1.1.3"
glob "^7.0.3"
json-stable-stringify "^1.0.1"
mkdirp "^0.5.1"

"react@^15 || ^16", react@^15.5.4:
version "15.6.1"
resolved "https://registry.yarnpkg.com/react/-/react-15.6.1.tgz#baa8434ec6780bde997cdc380b79cd33b96393df"
Expand Down Expand Up @@ -6275,15 +6270,15 @@ svgo@^0.7.0:
sax "~1.2.1"
whet.extend "~0.9.9"

sw-precache-webpack-plugin@0.9.1:
version "0.9.1"
resolved "https://registry.yarnpkg.com/sw-precache-webpack-plugin/-/sw-precache-webpack-plugin-0.9.1.tgz#2381ff706fbb6cabdb20a20337de8e58fb49a2a7"
sw-precache-webpack-plugin@0.11.4:
version "0.11.4"
resolved "https://registry.yarnpkg.com/sw-precache-webpack-plugin/-/sw-precache-webpack-plugin-0.11.4.tgz#a695017e54eed575551493a519dc1da8da2dc5e0"
dependencies:
del "^2.2.2"
sw-precache "^5.0.0"
uglify-js "^2.8.5"
sw-precache "^5.1.1"
uglify-js "^3.0.13"

sw-precache@^5.0.0:
sw-precache@^5.1.1:
version "5.2.0"
resolved "https://registry.yarnpkg.com/sw-precache/-/sw-precache-5.2.0.tgz#eb6225ce580ceaae148194578a0ad01ab7ea199c"
dependencies:
Expand Down Expand Up @@ -6471,7 +6466,7 @@ [email protected]:
commander "~2.9.0"
source-map "~0.5.1"

uglify-js@^2.6, uglify-js@^2.8.29, uglify-js@^2.8.5:
uglify-js@^2.6, uglify-js@^2.8.29:
version "2.8.29"
resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-2.8.29.tgz#29c5733148057bb4e1f75df35b7a9cb72e6a59dd"
dependencies:
Expand All @@ -6480,6 +6475,13 @@ uglify-js@^2.6, uglify-js@^2.8.29, uglify-js@^2.8.5:
optionalDependencies:
uglify-to-browserify "~1.0.0"

uglify-js@^3.0.13:
version "3.0.28"
resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.0.28.tgz#96b8495f0272944787b5843a1679aa326640d5f7"
dependencies:
commander "~2.11.0"
source-map "~0.5.1"

uglify-to-browserify@~1.0.0:
version "1.0.2"
resolved "https://registry.yarnpkg.com/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz#6e0924d6bda6b5afe349e39a6d632850a0f882b7"
Expand Down Expand Up @@ -6905,12 +6907,6 @@ yallist@^2.1.2:
version "2.1.2"
resolved "https://registry.yarnpkg.com/yallist/-/yallist-2.1.2.tgz#1c11f9218f076089a47dd512f93c6699a6a81d52"

yaml-loader@^0.5.0:
version "0.5.0"
resolved "https://registry.yarnpkg.com/yaml-loader/-/yaml-loader-0.5.0.tgz#86b1982d84a8e429e6647d93de9a0169e1c15827"
dependencies:
js-yaml "^3.5.2"

yargs-parser@^4.2.0:
version "4.2.1"
resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-4.2.1.tgz#29cceac0dc4f03c6c87b4a9f217dd18c9f74871c"
Expand Down