@lage-run/scheduler 1.1.13 → 1.2.0

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/CHANGELOG.json CHANGED
@@ -2,7 +2,22 @@
2
2
  "name": "@lage-run/scheduler",
3
3
  "entries": [
4
4
  {
5
- "date": "Fri, 15 Mar 2024 04:34:52 GMT",
5
+ "date": "Tue, 23 Apr 2024 22:21:17 GMT",
6
+ "version": "1.2.0",
7
+ "tag": "@lage-run/scheduler_v1.2.0",
8
+ "comments": {
9
+ "minor": [
10
+ {
11
+ "author": "elcraig@microsoft.com",
12
+ "package": "@lage-run/scheduler",
13
+ "commit": "f324cccc43c32e2edf1767ccf7d7d72294421715",
14
+ "comment": "Set shell: true when spawning npm commands, due to Node security fix"
15
+ }
16
+ ]
17
+ }
18
+ },
19
+ {
20
+ "date": "Fri, 15 Mar 2024 04:35:11 GMT",
6
21
  "version": "1.1.13",
7
22
  "tag": "@lage-run/scheduler_v1.1.13",
8
23
  "comments": {
package/CHANGELOG.md CHANGED
@@ -1,12 +1,20 @@
1
1
  # Change Log - @lage-run/scheduler
2
2
 
3
- This log was last generated on Fri, 15 Mar 2024 04:34:52 GMT and should not be manually modified.
3
+ This log was last generated on Tue, 23 Apr 2024 22:21:17 GMT and should not be manually modified.
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
+ ## 1.2.0
8
+
9
+ Tue, 23 Apr 2024 22:21:17 GMT
10
+
11
+ ### Minor changes
12
+
13
+ - Set shell: true when spawning npm commands, due to Node security fix (elcraig@microsoft.com)
14
+
7
15
  ## 1.1.13
8
16
 
9
- Fri, 15 Mar 2024 04:34:52 GMT
17
+ Fri, 15 Mar 2024 04:35:11 GMT
10
18
 
11
19
  ### Patches
12
20
 
@@ -29,7 +29,6 @@ export declare class NpmScriptRunner implements TargetRunner {
29
29
  constructor(options: NpmScriptRunnerOptions);
30
30
  private getNpmArgs;
31
31
  private hasNpmScript;
32
- private validateOptions;
33
32
  shouldRun(target: Target): Promise<boolean>;
34
33
  run(runOptions: TargetRunnerOptions): Promise<void>;
35
34
  }
@@ -8,7 +8,6 @@ Object.defineProperty(exports, "NpmScriptRunner", {
8
8
  return NpmScriptRunner;
9
9
  }
10
10
  });
11
- const _fs = require("fs");
12
11
  const _path = require("path");
13
12
  const _promises = require("fs/promises");
14
13
  const _child_process = require("child_process");
@@ -43,11 +42,6 @@ class NpmScriptRunner {
43
42
  const packageJson = JSON.parse(await (0, _promises.readFile)(packageJsonPath, "utf8"));
44
43
  return !!packageJson.scripts?.[task];
45
44
  }
46
- validateOptions(options) {
47
- if (!(0, _fs.existsSync)(options.npmCmd)) {
48
- throw new Error(`NPM Script Runner: ${this.options.npmCmd} does not exist`);
49
- }
50
- }
51
45
  async shouldRun(target) {
52
46
  // By convention, do not run anything if there is no script for this task defined in package.json (counts as "success")
53
47
  return await this.hasNpmScript(target);
@@ -99,11 +93,13 @@ class NpmScriptRunner {
99
93
  "pipe",
100
94
  "pipe"
101
95
  ],
96
+ // This is required for Windows due to https://nodejs.org/en/blog/vulnerability/april-2024-security-releases-2
97
+ shell: true,
102
98
  env: {
103
- ...process.env,
104
99
  ...process.stdout.isTTY && {
105
100
  FORCE_COLOR: "1"
106
101
  },
102
+ ...process.env,
107
103
  ...npmRunNodeOptions && {
108
104
  NODE_OPTIONS: npmRunNodeOptions
109
105
  },
@@ -144,7 +140,6 @@ class NpmScriptRunner {
144
140
  constructor(options){
145
141
  _define_property(this, "options", void 0);
146
142
  this.options = options;
147
- this.validateOptions(options);
148
143
  }
149
144
  }
150
145
  _define_property(NpmScriptRunner, "gracefulKillTimeout", 2500);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lage-run/scheduler",
3
- "version": "1.1.13",
3
+ "version": "1.2.0",
4
4
  "description": "Scheduler for Lage",
5
5
  "repository": {
6
6
  "type": "git",