Skip to content
Permalink
Browse files

Remove dependency on local git checkout from build process (#17475)

* Remove dependency on local git checkout from build process

* Updated Webpack dependencies to account for recent changes to deps for Flight
  • Loading branch information
bvaughn committed Nov 27, 2019
1 parent 6470e0f commit 5fc97420b95d36e50a064ec351d2fedca22e9464
@@ -1,7 +1,7 @@
const {resolve} = require('path');
const {DefinePlugin} = require('webpack');
const {
getGitHubURL,
GITHUB_URL,
getVersionString,
} = require('react-devtools-extensions/utils');

@@ -15,7 +15,6 @@ const builtModulesDir = resolve(__dirname, '..', '..', 'build', 'node_modules');

const __DEV__ = NODE_ENV === 'development';

const GITHUB_URL = getGitHubURL();
const DEVTOOLS_VERSION = getVersionString();

module.exports = {
@@ -1,7 +1,7 @@
const {resolve} = require('path');
const {DefinePlugin} = require('webpack');
const {
getGitHubURL,
GITHUB_URL,
getVersionString,
} = require('react-devtools-extensions/utils');

@@ -15,7 +15,6 @@ const builtModulesDir = resolve(__dirname, '..', '..', 'build', 'node_modules');

const __DEV__ = NODE_ENV === 'development';

const GITHUB_URL = getGitHubURL();
const DEVTOOLS_VERSION = getVersionString();

module.exports = {
@@ -1,5 +1,4 @@
{

"name": "react-devtools-extensions",
"version": "0.0.0",
"private": true,
@@ -26,18 +25,18 @@
"babel-core": "^7.0.0-bridge",
"babel-eslint": "^9.0.0",
"babel-loader": "^8.0.4",
"chrome-launch": "^1.1.4",
"child-process-promise": "^2.2.1",
"css-loader": "^1.0.1",
"chrome-launch": "^1.1.4",
"crx": "^5.0.0",
"css-loader": "^1.0.1",
"firefox-profile": "^1.0.2",
"node-libs-browser": "0.5.3",
"nullthrows": "^1.0.0",
"raw-loader": "^3.1.0",
"style-loader": "^0.23.1",
"web-ext": "^3.0.0",
"webpack": "^4.26.0",
"webpack-cli": "^3.1.2",
"webpack": "^4.41.2",
"webpack-cli": "^3.3.10",
"webpack-dev-server": "^3.3.1"
}
}
@@ -2,25 +2,17 @@ const {execSync} = require('child_process');
const {readFileSync} = require('fs');
const {resolve} = require('path');

function getGitCommit() {
return execSync('git show -s --format=%h')
.toString()
.trim();
}
const GITHUB_URL = 'https://github.com/facebook/react';

function getGitHubURL() {
// TODO potentially replace this with an fb.me URL (assuming it can forward the query params)
const url = execSync('git remote get-url origin')
.toString()
.trim();

if (url.startsWith('https://')) {
return url.replace('.git', '');
} else {
return url
.replace(':', '/')
.replace('git@', 'https://')
.replace('.git', '');
function getGitCommit() {
try {
return execSync('git show -s --format=%h')
.toString()
.trim();
} catch (error) {
// Mozilla runs this command from a git archive.
// In that context, there is no Git revision.
return null;
}
}

@@ -36,4 +28,8 @@ function getVersionString() {
return `${packageVersion}-${commit}`;
}

module.exports = {getGitCommit, getGitHubURL, getVersionString};
module.exports = {
GITHUB_URL,
getGitCommit,
getVersionString,
};
@@ -2,7 +2,7 @@

const {resolve} = require('path');
const {DefinePlugin} = require('webpack');
const {getGitHubURL, getVersionString} = require('./utils');
const {GITHUB_URL, getVersionString} = require('./utils');

const NODE_ENV = process.env.NODE_ENV;
if (!NODE_ENV) {
@@ -14,7 +14,6 @@ const builtModulesDir = resolve(__dirname, '..', '..', 'build', 'node_modules');

const __DEV__ = NODE_ENV === 'development';

const GITHUB_URL = getGitHubURL();
const DEVTOOLS_VERSION = getVersionString();

module.exports = {
@@ -2,7 +2,7 @@

const {resolve} = require('path');
const {DefinePlugin} = require('webpack');
const {getGitHubURL, getVersionString} = require('./utils');
const {GITHUB_URL, getVersionString} = require('./utils');

const NODE_ENV = process.env.NODE_ENV;
if (!NODE_ENV) {
@@ -14,7 +14,6 @@ const builtModulesDir = resolve(__dirname, '..', '..', 'build', 'node_modules');

const __DEV__ = NODE_ENV === 'development';

const GITHUB_URL = getGitHubURL();
const DEVTOOLS_VERSION = getVersionString();

module.exports = {
@@ -38,8 +38,8 @@
"css-loader": "^1.0.1",
"raw-loader": "^3.1.0",
"style-loader": "^0.23.1",
"webpack": "^4.26.0",
"webpack-cli": "^3.1.2",
"webpack": "^4.41.2",
"webpack-cli": "^3.3.10",
"webpack-dev-server": "^3.3.1"
}
}
@@ -1,7 +1,7 @@
const {resolve} = require('path');
const {DefinePlugin} = require('webpack');
const {
getGitHubURL,
GITHUB_URL,
getVersionString,
} = require('react-devtools-extensions/utils');

@@ -13,7 +13,6 @@ if (!NODE_ENV) {

const __DEV__ = true; // NODE_ENV === 'development';

const GITHUB_URL = getGitHubURL();
const DEVTOOLS_VERSION = getVersionString();

module.exports = {
@@ -26,8 +26,8 @@
"css-loader": "^1.0.1",
"raw-loader": "^3.1.0",
"style-loader": "^0.23.1",
"webpack": "^4.26.0",
"webpack-cli": "^3.1.2",
"webpack": "^4.41.2",
"webpack-cli": "^3.3.10",
"webpack-dev-server": "^3.3.1"
}
}
@@ -1,7 +1,7 @@
const {resolve} = require('path');
const {DefinePlugin} = require('webpack');
const {
getGitHubURL,
GITHUB_URL,
getVersionString,
} = require('react-devtools-extensions/utils');

@@ -21,7 +21,6 @@ const builtModulesDir = resolve(__dirname, '..', '..', 'build', 'node_modules');

const __DEV__ = NODE_ENV === 'development';

const GITHUB_URL = getGitHubURL();
const DEVTOOLS_VERSION = getVersionString();

const config = {
resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-4.0.2.tgz#a855980b1f0b6b359ba1d5d9fb39ae941faa63ad"
integrity sha512-YQ+BmxuTgd6UXZW3+ICGfyqRyHXVlD5GtQr5+qjiNW7bF0cqrzX500HVXPBOvgXb5YnzDd+h0zqyv61KUD7+Sg==

webpack-cli@^3.1.2:
version "3.3.6"
resolved "https://registry.yarnpkg.com/webpack-cli/-/webpack-cli-3.3.6.tgz#2c8c399a2642133f8d736a359007a052e060032c"
integrity sha512-0vEa83M7kJtxK/jUhlpZ27WHIOndz5mghWL2O53kiDoA9DIxSKnfqB92LoqEn77cT4f3H2cZm1BMEat/6AZz3A==
webpack-cli@^3.3.10:
version "3.3.10"
resolved "https://registry.yarnpkg.com/webpack-cli/-/webpack-cli-3.3.10.tgz#17b279267e9b4fb549023fae170da8e6e766da13"
integrity sha512-u1dgND9+MXaEt74sJR4PR7qkPxXUSQ0RXYq8x1L6Jg1MYVEmGPrH6Ah6C4arD4r0J1P5HKjRqpab36k0eIzPqg==
dependencies:
chalk "2.4.2"
cross-spawn "6.0.5"
source-list-map "^2.0.0"
source-map "~0.6.1"

webpack@^4.26.0:
version "4.39.2"
resolved "https://registry.yarnpkg.com/webpack/-/webpack-4.39.2.tgz#c9aa5c1776d7c309d1b3911764f0288c8c2816aa"
integrity sha512-AKgTfz3xPSsEibH00JfZ9sHXGUwIQ6eZ9tLN8+VLzachk1Cw2LVmy+4R7ZiwTa9cZZ15tzySjeMui/UnSCAZhA==
dependencies:
"@webassemblyjs/ast" "1.8.5"
"@webassemblyjs/helper-module-context" "1.8.5"
"@webassemblyjs/wasm-edit" "1.8.5"
"@webassemblyjs/wasm-parser" "1.8.5"
acorn "^6.2.1"
ajv "^6.10.2"
ajv-keywords "^3.4.1"
chrome-trace-event "^1.0.2"
enhanced-resolve "^4.1.0"
eslint-scope "^4.0.3"
json-parse-better-errors "^1.0.2"
loader-runner "^2.4.0"
loader-utils "^1.2.3"
memory-fs "^0.4.1"
micromatch "^3.1.10"
mkdirp "^0.5.1"
neo-async "^2.6.1"
node-libs-browser "^2.2.1"
schema-utils "^1.0.0"
tapable "^1.1.3"
terser-webpack-plugin "^1.4.1"
watchpack "^1.6.0"
webpack-sources "^1.4.1"

webpack@^4.41.2:
version "4.41.2"
resolved "https://registry.yarnpkg.com/webpack/-/webpack-4.41.2.tgz#c34ec76daa3a8468c9b61a50336d8e3303dce74e"

0 comments on commit 5fc9742

Please sign in to comment.
You can’t perform that action at this time.