@lage-run/scheduler 1.1.13 → 1.2.1

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,43 @@
2
2
  "name": "@lage-run/scheduler",
3
3
  "entries": [
4
4
  {
5
- "date": "Fri, 15 Mar 2024 04:34:52 GMT",
5
+ "date": "Sun, 05 May 2024 22:55:31 GMT",
6
+ "version": "1.2.1",
7
+ "tag": "@lage-run/scheduler_v1.2.1",
8
+ "comments": {
9
+ "patch": [
10
+ {
11
+ "author": "beachball",
12
+ "package": "@lage-run/scheduler",
13
+ "comment": "Bump @lage-run/cache to v1.1.6",
14
+ "commit": "not available"
15
+ },
16
+ {
17
+ "author": "beachball",
18
+ "package": "@lage-run/scheduler",
19
+ "comment": "Bump @lage-run/hasher to v1.1.1",
20
+ "commit": "not available"
21
+ }
22
+ ]
23
+ }
24
+ },
25
+ {
26
+ "date": "Tue, 23 Apr 2024 22:21:27 GMT",
27
+ "version": "1.2.0",
28
+ "tag": "@lage-run/scheduler_v1.2.0",
29
+ "comments": {
30
+ "minor": [
31
+ {
32
+ "author": "elcraig@microsoft.com",
33
+ "package": "@lage-run/scheduler",
34
+ "commit": "f324cccc43c32e2edf1767ccf7d7d72294421715",
35
+ "comment": "Set shell: true when spawning npm commands, due to Node security fix"
36
+ }
37
+ ]
38
+ }
39
+ },
40
+ {
41
+ "date": "Fri, 15 Mar 2024 04:35:11 GMT",
6
42
  "version": "1.1.13",
7
43
  "tag": "@lage-run/scheduler_v1.1.13",
8
44
  "comments": {
package/CHANGELOG.md CHANGED
@@ -1,12 +1,29 @@
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 Sun, 05 May 2024 22:55:31 GMT and should not be manually modified.
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
+ ## 1.2.1
8
+
9
+ Sun, 05 May 2024 22:55:31 GMT
10
+
11
+ ### Patches
12
+
13
+ - Bump @lage-run/cache to v1.1.6
14
+ - Bump @lage-run/hasher to v1.1.1
15
+
16
+ ## 1.2.0
17
+
18
+ Tue, 23 Apr 2024 22:21:27 GMT
19
+
20
+ ### Minor changes
21
+
22
+ - Set shell: true when spawning npm commands, due to Node security fix (elcraig@microsoft.com)
23
+
7
24
  ## 1.1.13
8
25
 
9
- Fri, 15 Mar 2024 04:34:52 GMT
26
+ Fri, 15 Mar 2024 04:35:11 GMT
10
27
 
11
28
  ### Patches
12
29
 
@@ -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.1",
4
4
  "description": "Scheduler for Lage",
5
5
  "repository": {
6
6
  "type": "git",
@@ -19,9 +19,9 @@
19
19
  "dependencies": {
20
20
  "@lage-run/target-graph": "^0.8.9",
21
21
  "@lage-run/logger": "^1.3.0",
22
- "@lage-run/cache": "^1.1.5",
22
+ "@lage-run/cache": "^1.1.6",
23
23
  "@lage-run/config": "^0.3.5",
24
- "@lage-run/hasher": "^1.1.0",
24
+ "@lage-run/hasher": "^1.1.1",
25
25
  "@lage-run/worker-threads-pool": "^0.8.0"
26
26
  },
27
27
  "devDependencies": {