Skip to content
Permalink
Browse files

build: ensure consistent lock files across multiple machines (#17955)

* build: ensure consistent package-lock across multiple machines

* build: fix linting errors and use npm ci instead of npm install

* build: use a yarn.lock and yarn instead of package-lock and npm

* chore: replace package-lock.json files with yarn.lock

* chore: replace last instance of `npm install`
  • Loading branch information...
MarshallOfSound committed Apr 30, 2019
1 parent 8d83518 commit 98c51dd6608a66bd35ca0db696824c8e31e985a4
Showing with 9,970 additions and 15,506 deletions.
  1. +2 −1 .eslintrc.json
  2. +1 −1 .gitignore
  3. +1 −1 BUILD.gn
  4. +4 −1 DEPS
  5. +2 −2 atom/common/node_bindings.cc
  6. +1 −1 build/npm.gni
  7. +1 −1 build/tsc.gni
  8. +0 −13,817 package-lock.json
  9. +3 −0 package.json
  10. +1 −1 script/bump-version.js
  11. +1 −1 script/generate-deps-hash.js
  12. +18 −0 script/lib/npx.py
  13. +3 −1 script/lint.js
  14. +5 −2 script/spec-runner.js
  15. +0 −1,675 spec/package-lock.json
  16. +1 −1 spec/package.json
  17. +1,345 −0 spec/yarn.lock
  18. +8,581 −0 yarn.lock
@@ -16,7 +16,8 @@
}],
"prefer-const": ["error", {
"destructuring": "all"
}]
}],
"node/no-deprecated-api": 0
},
"parserOptions": {
"ecmaVersion": 6,
@@ -37,7 +37,7 @@
/vendor/pyyaml
node_modules/
SHASUMS256.txt
**/yarn.lock
**/package-lock.json
compile_commands.json
.envrc

@@ -64,7 +64,7 @@ config("branding") {
npm_action("build_electron_definitions") {
script = "gn-typescript-definitions"
args = [ rebase_path("$target_gen_dir/tsc/typings/electron.d.ts") ]
inputs = auto_filenames.api_docs + [ "package-lock.json" ]
inputs = auto_filenames.api_docs + [ "yarn.lock" ]

outputs = [
"$target_gen_dir/tsc/typings/electron.d.ts",
5 DEPS
@@ -24,6 +24,9 @@ vars = {
'requests_git': 'https://github.com/kennethreitz',
'yaml_git': 'https://github.com/yaml',

# KEEP IN SYNC WITH spec-runner FILE
'yarn_version': '1.15.2',

# To be able to build clean Chromium from sources.
'apply_patches': True,

@@ -110,7 +113,7 @@ hooks = [
'action': [
'python',
'-c',
'import os, subprocess; os.chdir(os.path.join("src", "electron")); subprocess.check_call(["python", "script/lib/npm.py", "install"]);',
'import os, subprocess; os.chdir(os.path.join("src", "electron")); subprocess.check_call(["python", "script/lib/npx.py", "yarn@' + (Var("yarn_version")) + '", "install", "--frozen-lockfile"]);',
],
},
{
@@ -130,7 +130,7 @@ namespace {
// is not modified.
std::unique_ptr<const char* []> StringVectorToArgArray(
const std::vector<std::string>& vector) {
std::unique_ptr<const char* []> array(new const char*[vector.size()]);
std::unique_ptr<const char*[]> array(new const char*[vector.size()]);
for (size_t i = 0; i < vector.size(); ++i) {
array[i] = vector[i].c_str();
}
@@ -325,7 +325,7 @@ node::Environment* NodeBindings::CreateEnvironment(
.Append(FILE_PATH_LITERAL("init.js"));
args.insert(args.begin() + 1, script_path.AsUTF8Unsafe());

std::unique_ptr<const char* []> c_argv = StringVectorToArgArray(args);
std::unique_ptr<const char*[]> c_argv = StringVectorToArgArray(args);
node::Environment* env = node::CreateEnvironment(
node::CreateIsolateData(context->GetIsolate(), uv_loop_, platform),
context, args.size(), c_argv.get(), 0, nullptr);
@@ -6,7 +6,7 @@ template("npm_action") {
action("npm_pre_flight_" + target_name) {
inputs = [
"package.json",
"package-lock.json",
"yarn.lock",
]
script = "//electron/build/npm-run.py"

@@ -21,7 +21,7 @@ template("typescript_build") {
inputs = [
invoker.tsconfig,
"//electron/tsconfig.json",
"//electron/package-lock.json",
"//electron/yarn.lock",
"//electron/typings/internal-ambient.d.ts",
"//electron/typings/internal-electron.d.ts",
"//electron/typings/internal-helpers.d.ts",
Oops, something went wrong.

0 comments on commit 98c51dd

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