-
Notifications
You must be signed in to change notification settings - Fork 519
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test(npm_install): Add angular deps and update golden files
- Loading branch information
Showing
22 changed files
with
5,408 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
/** | ||
* @fileoverview | ||
* This script is run as part of the nodejs binary bootstrapping process. | ||
* It is required because generate_build_file.js imports ng_apf_library.js | ||
* from the same directory it is in. This script moves the dependency to the | ||
* right location to simulate Bazel copy the template to npm/external. | ||
*/ | ||
|
||
const path = require('path'); | ||
const fs = require('fs'); | ||
|
||
let source, dist; | ||
const {RUNFILES_MANIFEST_FILE, TEST_TARGET} = process.env; | ||
|
||
// Read the manifest only when running under `bazel test`. | ||
if (TEST_TARGET && RUNFILES_MANIFEST_FILE) { | ||
// This code path is executed on Windows where runfiles are not used. | ||
const manifest = fs.readFileSync(RUNFILES_MANIFEST_FILE, 'utf-8'); | ||
const entry = manifest.split('\n').find(line => { | ||
return line.startsWith("build_bazel_rules_nodejs/internal/ng_apf_library/ng_apf_library.js"); | ||
}); | ||
if (!entry) { | ||
throw new Error(`Could not find entry for 'ng_apf_library.js' in MANIFEST`); | ||
} | ||
source = entry.split(' ')[1]; | ||
dest = path.resolve(source, '../../npm_install/ng_apf_library.js'); | ||
} else { | ||
// For generating the golden files under `bazel run`. | ||
source = 'internal/ng_apf_library/ng_apf_library.js'; | ||
dest = 'internal/npm_install/ng_apf_library.js'; | ||
} | ||
|
||
fs.copyFileSync(source, dest); |
14 changes: 14 additions & 0 deletions
14
internal/npm_install/test/golden/@angular/core/BUILD.bazel.golden
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
|
||
package(default_visibility = ["//visibility:public"]) | ||
alias( | ||
name = "core", | ||
actual = "//node_modules/@angular/core:core__pkg" | ||
) | ||
alias( | ||
name = "core__files", | ||
actual = "//node_modules/@angular/core:core__files" | ||
) | ||
alias( | ||
name = "core__typings", | ||
actual = "//node_modules/@angular/core:core__typings" | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.