@node-core/utils 5.0.0 → 5.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/ci/run_ci.js CHANGED
@@ -26,7 +26,9 @@ export class RunPRJob {
26
26
  this.prData = new PRData({ prid, owner, repo }, cli, request);
27
27
  this.certifySafe =
28
28
  certifySafe ||
29
- new PRChecker(cli, this.prData, request, {}).checkCommitsAfterReview();
29
+ Promise.all([this.prData.getReviews(), this.prData.getPR()]).then(() =>
30
+ new PRChecker(cli, this.prData, request, {}).checkCommitsAfterReview()
31
+ );
30
32
  }
31
33
 
32
34
  async getCrumb() {
@@ -68,7 +70,7 @@ export class RunPRJob {
68
70
  async start() {
69
71
  const { cli, certifySafe } = this;
70
72
 
71
- if (!certifySafe) {
73
+ if (!(await certifySafe)) {
72
74
  cli.error('Refusing to run CI on potentially unsafe PR');
73
75
  return false;
74
76
  }
@@ -46,7 +46,8 @@ export const v8Deps = [
46
46
  match: '/base\n',
47
47
  replace: ''
48
48
  },
49
- since: 55
49
+ since: 55,
50
+ until: 125
50
51
  },
51
52
  {
52
53
  name: 'gtest',
@@ -146,6 +146,9 @@ async function readDeps(nodeDir, depName) {
146
146
  let deps;
147
147
  eval(depsDeclaration); // eslint-disable-line no-eval
148
148
  const dep = deps[depName];
149
+ if (!dep) {
150
+ throw new Error(`V8 dep "${depName}" not found in DEPS file`);
151
+ }
149
152
  if (typeof dep === 'object') {
150
153
  return dep.url.split('@');
151
154
  }
package/lib/utils.js CHANGED
@@ -1,3 +1,4 @@
1
+ import { platform } from 'node:os';
1
2
  import which from 'which';
2
3
 
3
4
  import { forceRunAsync } from './run.js';
@@ -62,5 +63,6 @@ export async function getEditor(options = {}) {
62
63
  }
63
64
  }
64
65
 
65
- return process.env.VISUAL || process.env.EDITOR || null;
66
+ return process.env.VISUAL || process.env.EDITOR ||
67
+ (platform() === 'win32' ? 'notepad.exe' : 'vi');
66
68
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@node-core/utils",
3
- "version": "5.0.0",
3
+ "version": "5.0.2",
4
4
  "description": "Utilities for Node.js core collaborators",
5
5
  "type": "module",
6
6
  "engines": {