Skip to content

Commit d72667a

Browse files
jbudzrbrtj
authored andcommitted
[build] Apply patches (elastic#265162)
Follow up to elastic#263121, which also needs to run on the build. https://buildkite.com/elastic/kibana-artifacts-snapshot/builds/8279 ``` jon@mbp % tar xzf kibana-9.4.0-SNAPSHOT-linux-x86_64.tar.gz --to-stdout kibana-9.4.0-SNAPSHOT/node_modules/zod/v4/classic/schemas.cjs | head -160 | tail -35 const checks = __importStar(require("./checks.cjs")); const iso = __importStar(require("./iso.cjs")); const parse = __importStar(require("./parse.cjs")); // Maps (internalProto, key) pairs already initialized — avoids repeated prototype setup const _protoInitMap = new WeakMap(); /** * Sets shared methods on the *internal* prototype layer of inst's concrete constructor * (once per concrete type per key). The internal prototype sits one level below the * user-visible `_.prototype`, keeping `Object.keys(_.prototype)` empty by default * and preventing V8 dictionary-mode degradation. * * Falls back to `Object.getPrototypeOf(inst)` for constructors not created with * `$constructor` (e.g., in tests or third-party code). */ function _initProto(inst, key, methods, defineProps) { const proto = inst._zod?.constr?.[core.$internalProto] ?? Object.getPrototypeOf(inst); ```
1 parent 8779857 commit d72667a

1 file changed

Lines changed: 17 additions & 0 deletions

File tree

src/dev/build/tasks/install_dependencies_task.ts

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,13 @@
77
* License v3.0 only", or the "Server Side Public License, v 1".
88
*/
99

10+
import { relative } from 'path';
11+
1012
import type { Task } from '../lib';
1113
import { exec } from '../lib';
1214

1315
const YARN_EXEC = process.env.npm_execpath || 'yarn';
16+
const NODE_EXEC = process.execPath || 'node';
1417

1518
export const InstallDependencies: Task = {
1619
description: 'Installing node_modules, including production builds of packages',
@@ -35,5 +38,19 @@ export const InstallDependencies: Task = {
3538
cwd: build.resolvePath(),
3639
}
3740
);
41+
42+
await exec(
43+
log,
44+
NODE_EXEC,
45+
[
46+
config.resolveFromRepo('node_modules/.bin/patch-package'),
47+
'--error-on-fail',
48+
'--patch-dir',
49+
relative(build.resolvePath(), config.resolveFromRepo('patches')),
50+
],
51+
{
52+
cwd: build.resolvePath(),
53+
}
54+
);
3855
},
3956
};

0 commit comments

Comments
 (0)