mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 17:28:26 -04:00
parent
64083ca284
commit
7621b410f9
10 changed files with 740 additions and 139609 deletions
|
@ -15,7 +15,6 @@
|
|||
/packages/eslint-config-kibana
|
||||
/packages/eslint-plugin-kibana-custom
|
||||
/packages/kbn-pm/dist
|
||||
/packages/kbn-pm/vendor
|
||||
/packages/kbn-plugin-generator/sao_template/template
|
||||
/packages/kbn-ui-framework/dist
|
||||
/packages/kbn-ui-framework/doc_site/build
|
||||
|
|
|
@ -304,6 +304,6 @@
|
|||
},
|
||||
"engines": {
|
||||
"node": "8.11.0",
|
||||
"yarn": "^1.3.2"
|
||||
"yarn": "^1.6.0"
|
||||
}
|
||||
}
|
||||
|
|
1487
packages/kbn-pm/dist/index.js
vendored
1487
packages/kbn-pm/dist/index.js
vendored
File diff suppressed because one or more lines are too long
|
@ -1,6 +0,0 @@
|
|||
// This is placed directly in `./src` to be consistent with the relative
|
||||
// location from `./dist` in the production build
|
||||
|
||||
import { join } from 'path';
|
||||
|
||||
export const yarnPath = join(__dirname, '../vendor/yarn-1.3.2.js');
|
|
@ -1,5 +1,4 @@
|
|||
import { spawn, spawnStreaming } from './child_process';
|
||||
import { yarnPath } from '../paths';
|
||||
import { Project } from './project';
|
||||
|
||||
/**
|
||||
|
@ -18,7 +17,7 @@ export async function installInDir(
|
|||
|
||||
// We pass the mutex flag to ensure only one instance of yarn runs at any
|
||||
// given time (e.g. to avoid conflicts).
|
||||
await spawn(yarnPath, options, {
|
||||
await spawn('yarn', options, {
|
||||
cwd: directory,
|
||||
});
|
||||
}
|
||||
|
@ -35,7 +34,7 @@ export async function runScriptInPackage(
|
|||
cwd: pkg.path,
|
||||
};
|
||||
|
||||
await spawn(yarnPath, ['run', script, ...args], execOpts);
|
||||
await spawn('yarn', ['run', script, ...args], execOpts);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -50,7 +49,7 @@ export function runScriptInPackageStreaming(
|
|||
cwd: pkg.path,
|
||||
};
|
||||
|
||||
return spawnStreaming(yarnPath, ['run', script, ...args], execOpts, {
|
||||
return spawnStreaming('yarn', ['run', script, ...args], execOpts, {
|
||||
prefix: pkg.name,
|
||||
});
|
||||
}
|
||||
|
|
14
packages/kbn-pm/vendor/README.md
vendored
14
packages/kbn-pm/vendor/README.md
vendored
|
@ -1,14 +0,0 @@
|
|||
Kibana ships with a vendored version of Yarn, which is used to install
|
||||
dependencies when preparing the production build of Kibana.
|
||||
|
||||
The currently vendored version of Yarn contains the bugfix in
|
||||
https://github.com/yarnpkg/yarn/pull/5059, which handles optional dependencies.
|
||||
|
||||
To build a new Yarn bundle, check out that pull request and run:
|
||||
|
||||
```
|
||||
yarn build-bundle
|
||||
```
|
||||
|
||||
This will create the file `artifacts/yarn-1.3.2.js`, which can be renamed and
|
||||
moved to this folder.
|
138822
packages/kbn-pm/vendor/yarn-1.3.2.js
vendored
138822
packages/kbn-pm/vendor/yarn-1.3.2.js
vendored
File diff suppressed because one or more lines are too long
|
@ -52,7 +52,7 @@ export default {
|
|||
],
|
||||
testPathIgnorePatterns: [
|
||||
'<rootDir>/packages/kbn-ui-framework/(dist|doc_site|generator-kui)/',
|
||||
'<rootDir>/packages/kbn-pm/(dist|vendor)/',
|
||||
'<rootDir>/packages/kbn-pm/dist/',
|
||||
'integration_tests/'
|
||||
],
|
||||
transform: {
|
||||
|
|
|
@ -15,7 +15,6 @@ export const IGNORE_FILE_GLOBS = [
|
|||
'**/Gruntfile.js',
|
||||
'tasks/config/**/*',
|
||||
'tasks/build/docker/docs/{Dockerfile,docker-compose.yml}',
|
||||
'packages/kbn-pm/vendor/yarn-1.3.2.js'
|
||||
];
|
||||
|
||||
|
||||
|
|
|
@ -1,17 +1,12 @@
|
|||
import { execFile } from 'child_process';
|
||||
module.exports = function (grunt) {
|
||||
grunt.registerTask('_build:installDependencies', function () {
|
||||
// We rely on a local version of Yarn that contains the bugfix from
|
||||
// https://github.com/yarnpkg/yarn/pull/5059. Once this fix is merged
|
||||
// and released we can use Yarn directly in the build.
|
||||
const yarn = require.resolve('../../packages/kbn-pm/vendor/yarn-1.3.2.js');
|
||||
|
||||
// We're using `pure-lockfile` instead of `frozen-lockfile` because we
|
||||
// rewrite `link:` dependencies to `file:` dependencies earlier in the
|
||||
// build. This means the lockfile won't be consistent, so instead of
|
||||
// verifying it, we just skip writing a new lockfile. However, this does
|
||||
// still use the existing lockfile for dependency resolution.
|
||||
execFile(yarn, ['--production', '--ignore-optional', '--pure-lockfile'], {
|
||||
execFile('yarn', ['--production', '--ignore-optional', '--pure-lockfile'], {
|
||||
cwd: grunt.config.process('<%= root %>/build/kibana')
|
||||
}, this.async());
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue