mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 01:38:56 -04:00
Co-authored-by: Tiago Costa <tiagoffcc@hotmail.com>
This commit is contained in:
parent
329e75d124
commit
e199fde836
8 changed files with 18 additions and 15 deletions
|
@ -8,7 +8,10 @@
|
|||
.idea
|
||||
.teamcity
|
||||
.yarn-local-mirror
|
||||
/bazel
|
||||
bazel-bin
|
||||
bazel-kibana
|
||||
bazel-out
|
||||
bazel-testlogs
|
||||
build
|
||||
node_modules
|
||||
target
|
||||
|
|
|
@ -18,17 +18,16 @@ build --disk_cache=~/.bazel-cache/disk-cache
|
|||
build --repository_cache=~/.bazel-cache/repository-cache
|
||||
|
||||
# Bazel will create symlinks from the workspace directory to output artifacts.
|
||||
# Build results will be placed in a directory called "bazel/bin"
|
||||
# Build results will be placed in a directory called "bazel-bin"
|
||||
# This will still create a bazel-out symlink in
|
||||
# the project directory, which must be excluded from the
|
||||
# editor's search path.
|
||||
build --symlink_prefix=bazel/
|
||||
# To disable the symlinks altogether (including bazel-out) we can use
|
||||
# build --symlink_prefix=/
|
||||
# however this makes it harder to find outputs.
|
||||
|
||||
# Prevents the creation of bazel-out dir
|
||||
build --experimental_no_product_name_out_symlink
|
||||
# build --experimental_no_product_name_out_symlink
|
||||
|
||||
# Make direct file system calls to create symlink trees
|
||||
build --experimental_inprocess_symlink_creation
|
||||
|
|
|
@ -48,4 +48,4 @@ snapshots.js
|
|||
/packages/kbn-monaco/src/painless/antlr
|
||||
|
||||
# Bazel
|
||||
/bazel
|
||||
/bazel-*
|
||||
|
|
4
.gitignore
vendored
4
.gitignore
vendored
|
@ -78,5 +78,5 @@ report.asciidoc
|
|||
.yarn-local-mirror
|
||||
|
||||
# Bazel
|
||||
/bazel
|
||||
/.bazelrc.user
|
||||
bazel-*
|
||||
.bazelrc.user
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
x-pack/plugins/canvas/shareable_runtime/**/*.s+(a|c)ss
|
||||
build
|
||||
target
|
||||
bazel-*
|
||||
|
|
8
packages/kbn-pm/dist/index.js
vendored
8
packages/kbn-pm/dist/index.js
vendored
|
@ -22981,7 +22981,7 @@ class Project {
|
|||
|
||||
ensureValidProjectDependency(project) {
|
||||
const relativePathToProject = normalizePath(path__WEBPACK_IMPORTED_MODULE_1___default.a.relative(this.path, project.path));
|
||||
const relativePathToProjectIfBazelPkg = normalizePath(path__WEBPACK_IMPORTED_MODULE_1___default.a.relative(this.path, `bazel/bin/packages/${path__WEBPACK_IMPORTED_MODULE_1___default.a.basename(project.path)}`));
|
||||
const relativePathToProjectIfBazelPkg = normalizePath(path__WEBPACK_IMPORTED_MODULE_1___default.a.relative(this.path, `bazel-bin/packages/${path__WEBPACK_IMPORTED_MODULE_1___default.a.basename(project.path)}`));
|
||||
const versionInPackageJson = this.allDependencies[project.name];
|
||||
const expectedVersionInPackageJson = `link:${relativePathToProject}`;
|
||||
const expectedVersionInPackageJsonIfBazelPkg = `link:${relativePathToProjectIfBazelPkg}`; // TODO: after introduce bazel to build all the packages and completely remove the support for kbn packages
|
||||
|
@ -23143,7 +23143,7 @@ const createProductionPackageJson = pkgJson => _objectSpread(_objectSpread({}, p
|
|||
dependencies: transformDependencies(pkgJson.dependencies)
|
||||
});
|
||||
const isLinkDependency = depVersion => depVersion.startsWith('link:');
|
||||
const isBazelPackageDependency = depVersion => depVersion.startsWith('link:bazel/bin/');
|
||||
const isBazelPackageDependency = depVersion => depVersion.startsWith('link:bazel-bin/');
|
||||
/**
|
||||
* Replaces `link:` dependencies with `file:` dependencies. When installing
|
||||
* dependencies, these `file:` dependencies will be copied into `node_modules`
|
||||
|
@ -23153,7 +23153,7 @@ const isBazelPackageDependency = depVersion => depVersion.startsWith('link:bazel
|
|||
* will then _copy_ the `file:` dependencies into `node_modules` instead of
|
||||
* symlinking like we do in development.
|
||||
*
|
||||
* Additionally it also taken care of replacing `link:bazel/bin/` with
|
||||
* Additionally it also taken care of replacing `link:bazel-bin/` with
|
||||
* `file:` so we can also support the copy of the Bazel packages dist already into
|
||||
* build/packages to be copied into the node_modules
|
||||
*/
|
||||
|
@ -23170,7 +23170,7 @@ function transformDependencies(dependencies = {}) {
|
|||
}
|
||||
|
||||
if (isBazelPackageDependency(depVersion)) {
|
||||
newDeps[name] = depVersion.replace('link:bazel/bin/', 'file:');
|
||||
newDeps[name] = depVersion.replace('link:bazel-bin/', 'file:');
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
|
@ -35,7 +35,7 @@ export const createProductionPackageJson = (pkgJson: IPackageJson) => ({
|
|||
export const isLinkDependency = (depVersion: string) => depVersion.startsWith('link:');
|
||||
|
||||
export const isBazelPackageDependency = (depVersion: string) =>
|
||||
depVersion.startsWith('link:bazel/bin/');
|
||||
depVersion.startsWith('link:bazel-bin/');
|
||||
|
||||
/**
|
||||
* Replaces `link:` dependencies with `file:` dependencies. When installing
|
||||
|
@ -46,7 +46,7 @@ export const isBazelPackageDependency = (depVersion: string) =>
|
|||
* will then _copy_ the `file:` dependencies into `node_modules` instead of
|
||||
* symlinking like we do in development.
|
||||
*
|
||||
* Additionally it also taken care of replacing `link:bazel/bin/` with
|
||||
* Additionally it also taken care of replacing `link:bazel-bin/` with
|
||||
* `file:` so we can also support the copy of the Bazel packages dist already into
|
||||
* build/packages to be copied into the node_modules
|
||||
*/
|
||||
|
@ -61,7 +61,7 @@ export function transformDependencies(dependencies: IPackageDependencies = {}) {
|
|||
}
|
||||
|
||||
if (isBazelPackageDependency(depVersion)) {
|
||||
newDeps[name] = depVersion.replace('link:bazel/bin/', 'file:');
|
||||
newDeps[name] = depVersion.replace('link:bazel-bin/', 'file:');
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
|
@ -92,7 +92,7 @@ export class Project {
|
|||
public ensureValidProjectDependency(project: Project) {
|
||||
const relativePathToProject = normalizePath(Path.relative(this.path, project.path));
|
||||
const relativePathToProjectIfBazelPkg = normalizePath(
|
||||
Path.relative(this.path, `bazel/bin/packages/${Path.basename(project.path)}`)
|
||||
Path.relative(this.path, `bazel-bin/packages/${Path.basename(project.path)}`)
|
||||
);
|
||||
|
||||
const versionInPackageJson = this.allDependencies[project.name];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue