@factorialco/gat 2.1.0 → 2.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.
Files changed (2) hide show
  1. package/dist/workflow.js +2 -1
  2. package/package.json +3 -2
package/dist/workflow.js CHANGED
@@ -9,6 +9,7 @@ const kebabCase_1 = __importDefault(require("lodash/kebabCase"));
9
9
  const fs_1 = __importDefault(require("fs"));
10
10
  const path_1 = __importDefault(require("path"));
11
11
  const util_1 = require("util");
12
+ const node_fetch_1 = __importDefault(require("node-fetch"));
12
13
  const step_1 = require("./step");
13
14
  const writeFilePromise = (0, util_1.promisify)(fs_1.default.writeFile);
14
15
  const DEFAULT_RUNNERS = ["ubuntu-22.04"];
@@ -25,7 +26,7 @@ const supplyChainAttack = async (step) => {
25
26
  if (!match)
26
27
  return uses;
27
28
  const { repository, version } = match.groups;
28
- const response = await fetch(`https://api.github.com/repos/${repository}/tags`);
29
+ const response = await (0, node_fetch_1.default)(`https://api.github.com/repos/${repository}/tags`);
29
30
  const tags = (await response.json());
30
31
  const tag = tags.find((tag) => tag.name === version);
31
32
  if (!tag)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@factorialco/gat",
3
- "version": "2.1.0",
3
+ "version": "2.2.0",
4
4
  "description": "Write your GitHub Actions workflows using TypeScript",
5
5
  "bin": {
6
6
  "gat": "dist/cli.js"
@@ -37,7 +37,8 @@
37
37
  },
38
38
  "dependencies": {
39
39
  "js-yaml": "^4.1.0",
40
- "lodash": "^4.17.21"
40
+ "lodash": "^4.17.21",
41
+ "node-fetch": "^3.3.2"
41
42
  },
42
43
  "repository": {
43
44
  "type": "git",