skuba 13.0.0-custom-conditions-exports-20250923055337 → 13.0.0-custom-conditions-exports-20251003064544

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 (169) hide show
  1. package/lib/cli/build/assets.js +3 -7
  2. package/lib/cli/build/assets.js.map +2 -2
  3. package/lib/cli/build/esbuild.d.ts +2 -1
  4. package/lib/cli/build/esbuild.js +4 -3
  5. package/lib/cli/build/esbuild.js.map +2 -2
  6. package/lib/cli/build/index.js +8 -4
  7. package/lib/cli/build/index.js.map +2 -2
  8. package/lib/cli/init/git.js +1 -1
  9. package/lib/cli/init/git.js.map +2 -2
  10. package/lib/cli/init/index.js +4 -4
  11. package/lib/cli/init/index.js.map +3 -3
  12. package/lib/cli/lint/annotate/buildkite/eslint.js +1 -1
  13. package/lib/cli/lint/annotate/buildkite/eslint.js.map +2 -2
  14. package/lib/cli/lint/annotate/buildkite/index.js +1 -1
  15. package/lib/cli/lint/annotate/buildkite/index.js.map +2 -2
  16. package/lib/cli/lint/annotate/buildkite/internal.js +1 -1
  17. package/lib/cli/lint/annotate/buildkite/internal.js.map +2 -2
  18. package/lib/cli/lint/annotate/buildkite/prettier.js +1 -1
  19. package/lib/cli/lint/annotate/buildkite/prettier.js.map +2 -2
  20. package/lib/cli/lint/annotate/buildkite/tsc.js +1 -1
  21. package/lib/cli/lint/annotate/buildkite/tsc.js.map +2 -2
  22. package/lib/cli/lint/annotate/github/eslint.d.ts +1 -1
  23. package/lib/cli/lint/annotate/github/eslint.js.map +2 -2
  24. package/lib/cli/lint/annotate/github/index.js +3 -4
  25. package/lib/cli/lint/annotate/github/index.js.map +2 -2
  26. package/lib/cli/lint/annotate/github/internal.d.ts +1 -1
  27. package/lib/cli/lint/annotate/github/internal.js.map +2 -2
  28. package/lib/cli/lint/annotate/github/prettier.d.ts +1 -1
  29. package/lib/cli/lint/annotate/github/prettier.js.map +2 -2
  30. package/lib/cli/lint/annotate/github/tsc.d.ts +1 -1
  31. package/lib/cli/lint/annotate/github/tsc.js.map +2 -2
  32. package/lib/cli/lint/autofix.d.ts +1 -1
  33. package/lib/cli/lint/autofix.js +3 -3
  34. package/lib/cli/lint/autofix.js.map +2 -2
  35. package/lib/cli/lint/internalLints/patchRenovateConfig.js +1 -1
  36. package/lib/cli/lint/internalLints/patchRenovateConfig.js.map +2 -2
  37. package/lib/{api/buildkite → cli/lint/internalLints/upgrade/patches/12.3.0}/index.js +17 -9
  38. package/lib/cli/lint/internalLints/upgrade/patches/12.3.0/index.js.map +7 -0
  39. package/lib/cli/lint/internalLints/upgrade/patches/12.3.0/patchApiTokenFromEnvironment.d.ts +3 -0
  40. package/lib/cli/lint/internalLints/upgrade/patches/12.3.0/patchApiTokenFromEnvironment.js +100 -0
  41. package/lib/cli/lint/internalLints/upgrade/patches/12.3.0/patchApiTokenFromEnvironment.js.map +7 -0
  42. package/lib/cli/lint/internalLints/upgrade/patches/12.3.0/patchDockerfileSyntaxDirective.d.ts +3 -0
  43. package/lib/cli/lint/internalLints/upgrade/patches/12.3.0/patchDockerfileSyntaxDirective.js +99 -0
  44. package/lib/cli/lint/internalLints/upgrade/patches/12.3.0/patchDockerfileSyntaxDirective.js.map +7 -0
  45. package/lib/cli/lint/internalLints/upgrade/patches/12.4.0/index.d.ts +2 -0
  46. package/lib/{api/net → cli/lint/internalLints/upgrade/patches/12.4.0}/index.js +12 -6
  47. package/lib/cli/lint/internalLints/upgrade/patches/12.4.0/index.js.map +7 -0
  48. package/lib/cli/lint/internalLints/upgrade/patches/12.4.0/patchDockerfileCIVariable.d.ts +3 -0
  49. package/lib/cli/lint/internalLints/upgrade/patches/12.4.0/patchDockerfileCIVariable.js +101 -0
  50. package/lib/cli/lint/internalLints/upgrade/patches/12.4.0/patchDockerfileCIVariable.js.map +7 -0
  51. package/lib/cli/lint/internalLints/upgrade/patches/{12.2.0 → 13.0.0}/configureTsConfigForESM.js.map +1 -1
  52. package/lib/cli/lint/internalLints/upgrade/patches/13.0.0/index.d.ts +2 -0
  53. package/lib/cli/lint/internalLints/upgrade/patches/{12.2.0 → 13.0.0}/index.js.map +1 -1
  54. package/lib/cli/lint/internalLints/upgrade/patches/13.0.0/rewriteSrcImports.d.ts +13 -0
  55. package/lib/cli/lint/internalLints/upgrade/patches/13.0.0/rewriteSrcImports.js +225 -0
  56. package/lib/cli/lint/internalLints/upgrade/patches/13.0.0/rewriteSrcImports.js.map +7 -0
  57. package/lib/cli/test/reporters/github/annotations.d.ts +1 -1
  58. package/lib/cli/test/reporters/github/annotations.js.map +1 -1
  59. package/lib/cli/test/reporters/github/index.js +3 -4
  60. package/lib/cli/test/reporters/github/index.js.map +2 -2
  61. package/lib/index.d.ts +4 -4
  62. package/lib/index.js +4 -4
  63. package/lib/index.js.map +2 -2
  64. package/lib/utils/dir.js +2 -2
  65. package/lib/utils/dir.js.map +3 -3
  66. package/lib/utils/manifest.d.ts +5 -1
  67. package/lib/utils/manifest.js +16 -7
  68. package/lib/utils/manifest.js.map +2 -2
  69. package/package.json +4 -3
  70. package/template/base/_pnpm-workspace.yaml +1 -0
  71. package/template/express-rest-api/Dockerfile +1 -1
  72. package/template/express-rest-api/Dockerfile.dev-deps +0 -2
  73. package/template/express-rest-api/package.json +1 -1
  74. package/template/greeter/Dockerfile +0 -2
  75. package/template/greeter/package.json +2 -2
  76. package/template/koa-rest-api/Dockerfile +1 -1
  77. package/template/koa-rest-api/Dockerfile.dev-deps +0 -2
  78. package/template/koa-rest-api/package.json +1 -1
  79. package/template/lambda-sqs-worker-cdk/Dockerfile +0 -2
  80. package/template/lambda-sqs-worker-cdk/infra/appStack.ts +1 -1
  81. package/template/lambda-sqs-worker-cdk/package.json +2 -2
  82. package/template/oss-npm-package/.github/workflows/release.yml +1 -1
  83. package/template/oss-npm-package/README.md +1 -1
  84. package/lib/api/buildkite/annotate.d.ts +0 -28
  85. package/lib/api/buildkite/annotate.js +0 -62
  86. package/lib/api/buildkite/annotate.js.map +0 -7
  87. package/lib/api/buildkite/index.d.ts +0 -3
  88. package/lib/api/buildkite/index.js.map +0 -7
  89. package/lib/api/buildkite/md.d.ts +0 -6
  90. package/lib/api/buildkite/md.js +0 -33
  91. package/lib/api/buildkite/md.js.map +0 -7
  92. package/lib/api/git/commit.d.ts +0 -15
  93. package/lib/api/git/commit.js +0 -52
  94. package/lib/api/git/commit.js.map +0 -7
  95. package/lib/api/git/commitAllChanges.d.ts +0 -19
  96. package/lib/api/git/commitAllChanges.js +0 -83
  97. package/lib/api/git/commitAllChanges.js.map +0 -7
  98. package/lib/api/git/currentBranch.d.ts +0 -10
  99. package/lib/api/git/currentBranch.js +0 -59
  100. package/lib/api/git/currentBranch.js.map +0 -7
  101. package/lib/api/git/findRoot.d.ts +0 -9
  102. package/lib/api/git/findRoot.js +0 -52
  103. package/lib/api/git/findRoot.js.map +0 -7
  104. package/lib/api/git/getChangedFiles.d.ts +0 -20
  105. package/lib/api/git/getChangedFiles.js +0 -81
  106. package/lib/api/git/getChangedFiles.js.map +0 -7
  107. package/lib/api/git/index.d.ts +0 -12
  108. package/lib/api/git/index.js +0 -61
  109. package/lib/api/git/index.js.map +0 -7
  110. package/lib/api/git/isFileGitIgnored.d.ts +0 -4
  111. package/lib/api/git/isFileGitIgnored.js +0 -49
  112. package/lib/api/git/isFileGitIgnored.js.map +0 -7
  113. package/lib/api/git/log.d.ts +0 -19
  114. package/lib/api/git/log.js +0 -71
  115. package/lib/api/git/log.js.map +0 -7
  116. package/lib/api/git/pull.d.ts +0 -35
  117. package/lib/api/git/pull.js +0 -69
  118. package/lib/api/git/pull.js.map +0 -7
  119. package/lib/api/git/push.d.ts +0 -52
  120. package/lib/api/git/push.js +0 -70
  121. package/lib/api/git/push.js.map +0 -7
  122. package/lib/api/git/remote.d.ts +0 -20
  123. package/lib/api/git/remote.js +0 -73
  124. package/lib/api/git/remote.js.map +0 -7
  125. package/lib/api/git/reset.d.ts +0 -12
  126. package/lib/api/git/reset.js +0 -62
  127. package/lib/api/git/reset.js.map +0 -7
  128. package/lib/api/git/statusMatrix.d.ts +0 -7
  129. package/lib/api/git/statusMatrix.js +0 -47
  130. package/lib/api/git/statusMatrix.js.map +0 -7
  131. package/lib/api/github/checkRun.d.ts +0 -44
  132. package/lib/api/github/checkRun.js +0 -81
  133. package/lib/api/github/checkRun.js.map +0 -7
  134. package/lib/api/github/environment.d.ts +0 -17
  135. package/lib/api/github/environment.js +0 -48
  136. package/lib/api/github/environment.js.map +0 -7
  137. package/lib/api/github/index.d.ts +0 -7
  138. package/lib/api/github/index.js +0 -48
  139. package/lib/api/github/index.js.map +0 -7
  140. package/lib/api/github/issueComment.d.ts +0 -61
  141. package/lib/api/github/issueComment.js +0 -99
  142. package/lib/api/github/issueComment.js.map +0 -7
  143. package/lib/api/github/octokit.d.ts +0 -6
  144. package/lib/api/github/octokit.js +0 -42
  145. package/lib/api/github/octokit.js.map +0 -7
  146. package/lib/api/github/pullRequest.d.ts +0 -21
  147. package/lib/api/github/pullRequest.js +0 -69
  148. package/lib/api/github/pullRequest.js.map +0 -7
  149. package/lib/api/github/push.d.ts +0 -85
  150. package/lib/api/github/push.js +0 -166
  151. package/lib/api/github/push.js.map +0 -7
  152. package/lib/api/net/compose.d.ts +0 -4
  153. package/lib/api/net/compose.js +0 -51
  154. package/lib/api/net/compose.js.map +0 -7
  155. package/lib/api/net/index.d.ts +0 -1
  156. package/lib/api/net/index.js.map +0 -7
  157. package/lib/api/net/socket.d.ts +0 -5
  158. package/lib/api/net/socket.js +0 -68
  159. package/lib/api/net/socket.js.map +0 -7
  160. package/lib/api/net/waitFor.d.ts +0 -22
  161. package/lib/api/net/waitFor.js +0 -40
  162. package/lib/api/net/waitFor.js.map +0 -7
  163. package/lib/cli/lint/internalLints/upgrade/patches/12.2.0/rewriteSrcImports.d.ts +0 -6
  164. package/lib/cli/lint/internalLints/upgrade/patches/12.2.0/rewriteSrcImports.js +0 -110
  165. package/lib/cli/lint/internalLints/upgrade/patches/12.2.0/rewriteSrcImports.js.map +0 -7
  166. /package/lib/cli/lint/internalLints/upgrade/patches/{12.2.0 → 12.3.0}/index.d.ts +0 -0
  167. /package/lib/cli/lint/internalLints/upgrade/patches/{12.2.0 → 13.0.0}/configureTsConfigForESM.d.ts +0 -0
  168. /package/lib/cli/lint/internalLints/upgrade/patches/{12.2.0 → 13.0.0}/configureTsConfigForESM.js +0 -0
  169. /package/lib/cli/lint/internalLints/upgrade/patches/{12.2.0 → 13.0.0}/index.js +0 -0
@@ -1,5 +1,3 @@
1
- # syntax=docker/dockerfile:1.18
2
-
3
1
  FROM public.ecr.aws/docker/library/node:22-alpine AS dev-deps
4
2
 
5
3
  RUN --mount=type=bind,source=package.json,target=package.json \
@@ -23,9 +23,9 @@
23
23
  },
24
24
  "devDependencies": {
25
25
  "@types/node": "^22.13.10",
26
- "skuba": "13.0.0-custom-conditions-exports-20250923055337"
26
+ "skuba": "13.0.0-custom-conditions-exports-20251003064544"
27
27
  },
28
- "packageManager": "pnpm@10.17.0",
28
+ "packageManager": "pnpm@10.17.1",
29
29
  "engines": {
30
30
  "node": ">=22"
31
31
  }
@@ -8,7 +8,7 @@ COPY . .
8
8
 
9
9
  RUN pnpm install --offline
10
10
  RUN pnpm build
11
- RUN pnpm install --offline --prod
11
+ RUN CI=true pnpm install --offline --prod
12
12
 
13
13
  ###
14
14
 
@@ -1,5 +1,3 @@
1
- # syntax=docker/dockerfile:1.18
2
-
3
1
  FROM public.ecr.aws/docker/library/node:22-alpine AS dev-deps
4
2
 
5
3
  RUN --mount=type=bind,source=package.json,target=package.json \
@@ -49,7 +49,7 @@
49
49
  "skuba": "*",
50
50
  "supertest": "^7.0.0"
51
51
  },
52
- "packageManager": "pnpm@10.17.0",
52
+ "packageManager": "pnpm@10.17.1",
53
53
  "engines": {
54
54
  "node": ">=22"
55
55
  }
@@ -1,5 +1,3 @@
1
- # syntax=docker/dockerfile:1.18
2
-
3
1
  FROM public.ecr.aws/docker/library/node:22-alpine AS dev-deps
4
2
 
5
3
  # Needed for cdk
@@ -19,7 +19,7 @@ import { DatadogLambda } from 'datadog-cdk-constructs-v2';
19
19
  import { config } from './config.js';
20
20
 
21
21
  // Updated by https://github.com/seek-oss/rynovate
22
- const DATADOG_EXTENSION_LAYER_VERSION = 86;
22
+ const DATADOG_EXTENSION_LAYER_VERSION = 87;
23
23
 
24
24
  // Updated by https://github.com/seek-oss/rynovate
25
25
  const DATADOG_NODE_LAYER_VERSION = 126;
@@ -41,9 +41,9 @@
41
41
  "datadog-lambda-js": "^12.0.0",
42
42
  "dd-trace": "^5.0.0",
43
43
  "pino-pretty": "^13.0.0",
44
- "skuba": "13.0.0-custom-conditions-exports-20250923055337"
44
+ "skuba": "13.0.0-custom-conditions-exports-20251003064544"
45
45
  },
46
- "packageManager": "pnpm@10.17.0",
46
+ "packageManager": "pnpm@10.17.1",
47
47
  "engines": {
48
48
  "node": ">=22"
49
49
  }
@@ -3,7 +3,7 @@ name: Release
3
3
  on:
4
4
  push:
5
5
  branches:
6
- - $default-branch
6
+ - main
7
7
  - beta
8
8
 
9
9
  permissions: {}
@@ -82,7 +82,7 @@ on:
82
82
  push:
83
83
  branches:
84
84
  # add others as necessary
85
- - $default-branch
85
+ - main
86
86
  - beta
87
87
  # - alpha
88
88
  ```
@@ -1,28 +0,0 @@
1
- export type AnnotationStyle = 'success' | 'info' | 'warning' | 'error';
2
- interface AnnotationOptions {
3
- context?: string;
4
- /**
5
- * Scopes an annotation's context to the Buildkite step ID.
6
- *
7
- * This lets you emit distinct annotations per step, and only takes effect if
8
- * the `BUILDKITE_STEP_ID` environment variable is present.
9
- */
10
- scopeContextToStep?: boolean;
11
- style?: AnnotationStyle;
12
- }
13
- export declare const MAX_SIZE: number;
14
- export declare const TRUNCATION_WARNING = "... [Truncated due to size limit]";
15
- /**
16
- * Asynchronously uploads a Buildkite annotation.
17
- *
18
- * If the following environment variables are not present,
19
- * the function will silently return without attempting to annotate:
20
- *
21
- * - `BUILDKITE`
22
- * - `BUILDKITE_AGENT_ACCESS_TOKEN`
23
- * - `BUILDKITE_JOB_ID`
24
- *
25
- * The `buildkite-agent` binary must also be on your `PATH`.
26
- */
27
- export declare const annotate: (markdown: string, opts?: AnnotationOptions) => Promise<void>;
28
- export {};
@@ -1,62 +0,0 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __export = (target, all) => {
7
- for (var name in all)
8
- __defProp(target, name, { get: all[name], enumerable: true });
9
- };
10
- var __copyProps = (to, from, except, desc) => {
11
- if (from && typeof from === "object" || typeof from === "function") {
12
- for (let key of __getOwnPropNames(from))
13
- if (!__hasOwnProp.call(to, key) && key !== except)
14
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
- }
16
- return to;
17
- };
18
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
- var annotate_exports = {};
20
- __export(annotate_exports, {
21
- MAX_SIZE: () => MAX_SIZE,
22
- TRUNCATION_WARNING: () => TRUNCATION_WARNING,
23
- annotate: () => annotate
24
- });
25
- module.exports = __toCommonJS(annotate_exports);
26
- var import_exec = require("../../utils/exec.js");
27
- var import_logging = require("../../utils/logging.js");
28
- const isAnnotationEnabled = async () => Boolean(
29
- process.env.BUILDKITE && process.env.BUILDKITE_AGENT_ACCESS_TOKEN && process.env.BUILDKITE_JOB_ID && await (0, import_exec.hasCommand)("buildkite-agent")
30
- );
31
- const MAX_SIZE = 1024 * 1024;
32
- const TRUNCATION_WARNING = "... [Truncated due to size limit]";
33
- const annotate = async (markdown, opts = {}) => {
34
- if (!await isAnnotationEnabled()) {
35
- return;
36
- }
37
- let truncatedMarkdown = markdown;
38
- if (markdown.length > MAX_SIZE) {
39
- const remainingSpace = MAX_SIZE - TRUNCATION_WARNING.length;
40
- truncatedMarkdown = markdown.slice(0, remainingSpace) + TRUNCATION_WARNING;
41
- import_logging.log.warn(`Annotation truncated, full message is: ${markdown}`);
42
- }
43
- const context = [
44
- opts.scopeContextToStep && process.env.BUILDKITE_STEP_ID,
45
- opts.context
46
- ].filter(Boolean).join("|");
47
- const { style } = opts;
48
- await (0, import_exec.exec)(
49
- "buildkite-agent",
50
- "annotate",
51
- ...context ? ["--context", context] : [],
52
- ...style ? ["--style", style] : [],
53
- truncatedMarkdown
54
- );
55
- };
56
- // Annotate the CommonJS export names for ESM import in node:
57
- 0 && (module.exports = {
58
- MAX_SIZE,
59
- TRUNCATION_WARNING,
60
- annotate
61
- });
62
- //# sourceMappingURL=annotate.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/api/buildkite/annotate.ts"],
4
- "sourcesContent": ["import { exec, hasCommand } from '../../utils/exec.js';\nimport { log } from '../../utils/logging.js';\n\nexport type AnnotationStyle = 'success' | 'info' | 'warning' | 'error';\n\nconst isAnnotationEnabled = async () =>\n Boolean(\n process.env.BUILDKITE &&\n process.env.BUILDKITE_AGENT_ACCESS_TOKEN &&\n process.env.BUILDKITE_JOB_ID &&\n (await hasCommand('buildkite-agent')),\n );\n\ninterface AnnotationOptions {\n context?: string;\n\n /**\n * Scopes an annotation's context to the Buildkite step ID.\n *\n * This lets you emit distinct annotations per step, and only takes effect if\n * the `BUILDKITE_STEP_ID` environment variable is present.\n */\n scopeContextToStep?: boolean;\n\n style?: AnnotationStyle;\n}\n\n// Buildkite annotation currently only supports 1MiB of data\nexport const MAX_SIZE = 1024 * 1024; // 1MiB in bytes\nexport const TRUNCATION_WARNING = '... [Truncated due to size limit]';\n\n/**\n * Asynchronously uploads a Buildkite annotation.\n *\n * If the following environment variables are not present,\n * the function will silently return without attempting to annotate:\n *\n * - `BUILDKITE`\n * - `BUILDKITE_AGENT_ACCESS_TOKEN`\n * - `BUILDKITE_JOB_ID`\n *\n * The `buildkite-agent` binary must also be on your `PATH`.\n */\nexport const annotate = async (\n markdown: string,\n opts: AnnotationOptions = {},\n): Promise<void> => {\n if (!(await isAnnotationEnabled())) {\n return;\n }\n\n // Check if the annotation exceeds the maximum size\n let truncatedMarkdown = markdown;\n if (markdown.length > MAX_SIZE) {\n // Notify user of truncation, leave space for message\n const remainingSpace = MAX_SIZE - TRUNCATION_WARNING.length;\n truncatedMarkdown = markdown.slice(0, remainingSpace) + TRUNCATION_WARNING;\n // Log full message to the build log\n log.warn(`Annotation truncated, full message is: ${markdown}`);\n }\n\n // Always scope to the current Buildkite step.\n const context = [\n opts.scopeContextToStep && process.env.BUILDKITE_STEP_ID,\n opts.context,\n ]\n .filter(Boolean)\n .join('|');\n\n const { style } = opts;\n\n await exec(\n 'buildkite-agent',\n 'annotate',\n ...(context ? ['--context', context] : []),\n ...(style ? ['--style', style] : []),\n truncatedMarkdown,\n );\n};\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAiC;AACjC,qBAAoB;AAIpB,MAAM,sBAAsB,YAC1B;AAAA,EACE,QAAQ,IAAI,aACV,QAAQ,IAAI,gCACZ,QAAQ,IAAI,oBACX,UAAM,wBAAW,iBAAiB;AACvC;AAiBK,MAAM,WAAW,OAAO;AACxB,MAAM,qBAAqB;AAc3B,MAAM,WAAW,OACtB,UACA,OAA0B,CAAC,MACT;AAClB,MAAI,CAAE,MAAM,oBAAoB,GAAI;AAClC;AAAA,EACF;AAGA,MAAI,oBAAoB;AACxB,MAAI,SAAS,SAAS,UAAU;AAE9B,UAAM,iBAAiB,WAAW,mBAAmB;AACrD,wBAAoB,SAAS,MAAM,GAAG,cAAc,IAAI;AAExD,uBAAI,KAAK,0CAA0C,QAAQ,EAAE;AAAA,EAC/D;AAGA,QAAM,UAAU;AAAA,IACd,KAAK,sBAAsB,QAAQ,IAAI;AAAA,IACvC,KAAK;AAAA,EACP,EACG,OAAO,OAAO,EACd,KAAK,GAAG;AAEX,QAAM,EAAE,MAAM,IAAI;AAElB,YAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA,GAAI,UAAU,CAAC,aAAa,OAAO,IAAI,CAAC;AAAA,IACxC,GAAI,QAAQ,CAAC,WAAW,KAAK,IAAI,CAAC;AAAA,IAClC;AAAA,EACF;AACF;",
6
- "names": []
7
- }
@@ -1,3 +0,0 @@
1
- export type { AnnotationStyle } from './annotate.js';
2
- export { annotate } from './annotate.js';
3
- export { md } from './md.js';
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/api/buildkite/index.ts"],
4
- "sourcesContent": ["export type { AnnotationStyle } from './annotate.js';\nexport { annotate } from './annotate.js';\nexport { md } from './md.js';\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,sBAAyB;AACzB,gBAAmB;",
6
- "names": []
7
- }
@@ -1,6 +0,0 @@
1
- /**
2
- * @internal
3
- */
4
- export declare const md: {
5
- terminal: (code: string) => string;
6
- };
@@ -1,33 +0,0 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __export = (target, all) => {
7
- for (var name in all)
8
- __defProp(target, name, { get: all[name], enumerable: true });
9
- };
10
- var __copyProps = (to, from, except, desc) => {
11
- if (from && typeof from === "object" || typeof from === "function") {
12
- for (let key of __getOwnPropNames(from))
13
- if (!__hasOwnProp.call(to, key) && key !== except)
14
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
- }
16
- return to;
17
- };
18
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
- var md_exports = {};
20
- __export(md_exports, {
21
- md: () => md
22
- });
23
- module.exports = __toCommonJS(md_exports);
24
- const md = {
25
- terminal: (code) => `\`\`\`term
26
- ${code.replace(/```/g, "\\`\\`\\`")}
27
- \`\`\``
28
- };
29
- // Annotate the CommonJS export names for ESM import in node:
30
- 0 && (module.exports = {
31
- md
32
- });
33
- //# sourceMappingURL=md.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/api/buildkite/md.ts"],
4
- "sourcesContent": ["/**\n * @internal\n */\nexport const md = {\n terminal: (code: string) =>\n `\\`\\`\\`term\\n${code.replace(/```/g, '\\\\`\\\\`\\\\`')}\\n\\`\\`\\``,\n};\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGO,MAAM,KAAK;AAAA,EAChB,UAAU,CAAC,SACT;AAAA,EAAe,KAAK,QAAQ,QAAQ,WAAW,CAAC;AAAA;AACpD;",
6
- "names": []
7
- }
@@ -1,15 +0,0 @@
1
- export interface Identity {
2
- email?: string;
3
- name?: string;
4
- }
5
- interface CommitParameters {
6
- author?: Identity;
7
- committer?: Identity;
8
- dir: string;
9
- message: string;
10
- }
11
- /**
12
- * Writes a commit to the local Git repository.
13
- */
14
- export declare const commit: ({ author, committer, dir, message, }: CommitParameters) => Promise<string>;
15
- export {};
@@ -1,52 +0,0 @@
1
- "use strict";
2
- var __create = Object.create;
3
- var __defProp = Object.defineProperty;
4
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
- var __getOwnPropNames = Object.getOwnPropertyNames;
6
- var __getProtoOf = Object.getPrototypeOf;
7
- var __hasOwnProp = Object.prototype.hasOwnProperty;
8
- var __export = (target, all) => {
9
- for (var name in all)
10
- __defProp(target, name, { get: all[name], enumerable: true });
11
- };
12
- var __copyProps = (to, from, except, desc) => {
13
- if (from && typeof from === "object" || typeof from === "function") {
14
- for (let key of __getOwnPropNames(from))
15
- if (!__hasOwnProp.call(to, key) && key !== except)
16
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
- }
18
- return to;
19
- };
20
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
- // If the importer is in node compatibility mode or this is not an ESM
22
- // file that has been converted to a CommonJS file using a Babel-
23
- // compatible transform (i.e. "__esModule" has not been set), then set
24
- // "default" to the CommonJS "module.exports" for node compatibility.
25
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
- mod
27
- ));
28
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
- var commit_exports = {};
30
- __export(commit_exports, {
31
- commit: () => commit
32
- });
33
- module.exports = __toCommonJS(commit_exports);
34
- var import_fs_extra = __toESM(require("fs-extra"));
35
- var import_isomorphic_git = __toESM(require("isomorphic-git"));
36
- const commit = async ({
37
- author = { name: "skuba" },
38
- committer = { name: "skuba" },
39
- dir,
40
- message
41
- }) => import_isomorphic_git.default.commit({
42
- author,
43
- committer,
44
- dir,
45
- fs: import_fs_extra.default,
46
- message
47
- });
48
- // Annotate the CommonJS export names for ESM import in node:
49
- 0 && (module.exports = {
50
- commit
51
- });
52
- //# sourceMappingURL=commit.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/api/git/commit.ts"],
4
- "sourcesContent": ["import fs from 'fs-extra';\nimport git from 'isomorphic-git';\n\nexport interface Identity {\n email?: string;\n name?: string;\n}\n\ninterface CommitParameters {\n author?: Identity;\n committer?: Identity;\n dir: string;\n message: string;\n}\n\n/**\n * Writes a commit to the local Git repository.\n */\nexport const commit = async ({\n author = { name: 'skuba' },\n committer = { name: 'skuba' },\n dir,\n message,\n}: CommitParameters): Promise<string> =>\n git.commit({\n author,\n committer,\n dir,\n fs,\n message,\n });\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,sBAAe;AACf,4BAAgB;AAiBT,MAAM,SAAS,OAAO;AAAA,EAC3B,SAAS,EAAE,MAAM,QAAQ;AAAA,EACzB,YAAY,EAAE,MAAM,QAAQ;AAAA,EAC5B;AAAA,EACA;AACF,MACE,sBAAAA,QAAI,OAAO;AAAA,EACT;AAAA,EACA;AAAA,EACA;AAAA,EACA,oBAAAC;AAAA,EACA;AACF,CAAC;",
6
- "names": ["git", "fs"]
7
- }
@@ -1,19 +0,0 @@
1
- import { type Identity } from './commit.js';
2
- import { type ChangedFile } from './getChangedFiles.js';
3
- interface CommitAllParameters {
4
- dir: string;
5
- message: string;
6
- author?: Identity;
7
- committer?: Identity;
8
- /**
9
- * File changes to exclude from the commit.
10
- *
11
- * Defaults to `[]` (no exclusions).
12
- */
13
- ignore?: ChangedFile[];
14
- }
15
- /**
16
- * Stages all changes and writes a commit to the local Git repository.
17
- */
18
- export declare const commitAllChanges: ({ dir, message, author, committer, ignore, }: CommitAllParameters) => Promise<string | undefined>;
19
- export {};
@@ -1,83 +0,0 @@
1
- "use strict";
2
- var __create = Object.create;
3
- var __defProp = Object.defineProperty;
4
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
- var __getOwnPropNames = Object.getOwnPropertyNames;
6
- var __getProtoOf = Object.getPrototypeOf;
7
- var __hasOwnProp = Object.prototype.hasOwnProperty;
8
- var __export = (target, all) => {
9
- for (var name in all)
10
- __defProp(target, name, { get: all[name], enumerable: true });
11
- };
12
- var __copyProps = (to, from, except, desc) => {
13
- if (from && typeof from === "object" || typeof from === "function") {
14
- for (let key of __getOwnPropNames(from))
15
- if (!__hasOwnProp.call(to, key) && key !== except)
16
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
- }
18
- return to;
19
- };
20
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
- // If the importer is in node compatibility mode or this is not an ESM
22
- // file that has been converted to a CommonJS file using a Babel-
23
- // compatible transform (i.e. "__esModule" has not been set), then set
24
- // "default" to the CommonJS "module.exports" for node compatibility.
25
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
- mod
27
- ));
28
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
- var commitAllChanges_exports = {};
30
- __export(commitAllChanges_exports, {
31
- commitAllChanges: () => commitAllChanges
32
- });
33
- module.exports = __toCommonJS(commitAllChanges_exports);
34
- var import_path = __toESM(require("path"));
35
- var import_fs_extra = __toESM(require("fs-extra"));
36
- var import_isomorphic_git = __toESM(require("isomorphic-git"));
37
- var import_commit = require("./commit.js");
38
- var import_findRoot = require("./findRoot.js");
39
- var import_getChangedFiles = require("./getChangedFiles.js");
40
- const commitAllChanges = async ({
41
- dir,
42
- message,
43
- author,
44
- committer,
45
- ignore
46
- }) => {
47
- const changedFiles = await (0, import_getChangedFiles.getChangedFiles)({ dir, ignore });
48
- if (!changedFiles.length) {
49
- return;
50
- }
51
- const gitRoot = await (0, import_findRoot.findRoot)({ dir });
52
- if (!gitRoot) {
53
- throw new Error(`Could not find Git root from directory: ${dir}`);
54
- }
55
- await Promise.all(
56
- changedFiles.map(async (file) => {
57
- const relativePath = import_path.default.relative(dir, file.path);
58
- if (relativePath.startsWith("..")) {
59
- return;
60
- }
61
- return file.state === "deleted" ? import_isomorphic_git.default.remove({
62
- fs: import_fs_extra.default,
63
- dir: gitRoot,
64
- filepath: file.path
65
- }) : import_isomorphic_git.default.add({
66
- fs: import_fs_extra.default,
67
- dir: gitRoot,
68
- filepath: file.path
69
- });
70
- })
71
- );
72
- return (0, import_commit.commit)({
73
- dir: gitRoot,
74
- message,
75
- author,
76
- committer
77
- });
78
- };
79
- // Annotate the CommonJS export names for ESM import in node:
80
- 0 && (module.exports = {
81
- commitAllChanges
82
- });
83
- //# sourceMappingURL=commitAllChanges.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/api/git/commitAllChanges.ts"],
4
- "sourcesContent": ["import path from 'path';\n\nimport fs from 'fs-extra';\nimport git from 'isomorphic-git';\n\nimport { type Identity, commit } from './commit.js';\nimport { findRoot } from './findRoot.js';\nimport { type ChangedFile, getChangedFiles } from './getChangedFiles.js';\n\ninterface CommitAllParameters {\n dir: string;\n message: string;\n author?: Identity;\n committer?: Identity;\n\n /**\n * File changes to exclude from the commit.\n *\n * Defaults to `[]` (no exclusions).\n */\n ignore?: ChangedFile[];\n}\n\n/**\n * Stages all changes and writes a commit to the local Git repository.\n */\nexport const commitAllChanges = async ({\n dir,\n message,\n\n author,\n committer,\n ignore,\n}: CommitAllParameters): Promise<string | undefined> => {\n const changedFiles = await getChangedFiles({ dir, ignore });\n\n if (!changedFiles.length) {\n return;\n }\n\n const gitRoot = await findRoot({ dir });\n\n if (!gitRoot) {\n throw new Error(`Could not find Git root from directory: ${dir}`);\n }\n\n await Promise.all(\n changedFiles.map(async (file) => {\n const relativePath = path.relative(dir, file.path);\n\n // Skipping file outside working directory, see https://github.com/seek-oss/skuba/pull/1269#discussion_r1335308704\n if (relativePath.startsWith('..')) {\n return;\n }\n\n return file.state === 'deleted'\n ? git.remove({\n fs,\n dir: gitRoot,\n filepath: file.path,\n })\n : git.add({\n fs,\n dir: gitRoot,\n filepath: file.path,\n });\n }),\n );\n\n return commit({\n dir: gitRoot,\n message,\n author,\n committer,\n });\n};\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAiB;AAEjB,sBAAe;AACf,4BAAgB;AAEhB,oBAAsC;AACtC,sBAAyB;AACzB,6BAAkD;AAmB3C,MAAM,mBAAmB,OAAO;AAAA,EACrC;AAAA,EACA;AAAA,EAEA;AAAA,EACA;AAAA,EACA;AACF,MAAwD;AACtD,QAAM,eAAe,UAAM,wCAAgB,EAAE,KAAK,OAAO,CAAC;AAE1D,MAAI,CAAC,aAAa,QAAQ;AACxB;AAAA,EACF;AAEA,QAAM,UAAU,UAAM,0BAAS,EAAE,IAAI,CAAC;AAEtC,MAAI,CAAC,SAAS;AACZ,UAAM,IAAI,MAAM,2CAA2C,GAAG,EAAE;AAAA,EAClE;AAEA,QAAM,QAAQ;AAAA,IACZ,aAAa,IAAI,OAAO,SAAS;AAC/B,YAAM,eAAe,YAAAA,QAAK,SAAS,KAAK,KAAK,IAAI;AAGjD,UAAI,aAAa,WAAW,IAAI,GAAG;AACjC;AAAA,MACF;AAEA,aAAO,KAAK,UAAU,YAClB,sBAAAC,QAAI,OAAO;AAAA,QACT,oBAAAC;AAAA,QACA,KAAK;AAAA,QACL,UAAU,KAAK;AAAA,MACjB,CAAC,IACD,sBAAAD,QAAI,IAAI;AAAA,QACN,oBAAAC;AAAA,QACA,KAAK;AAAA,QACL,UAAU,KAAK;AAAA,MACjB,CAAC;AAAA,IACP,CAAC;AAAA,EACH;AAEA,aAAO,sBAAO;AAAA,IACZ,KAAK;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,EACF,CAAC;AACH;",
6
- "names": ["path", "git", "fs"]
7
- }
@@ -1,10 +0,0 @@
1
- interface CurrentBranchParameters {
2
- dir?: string;
3
- env?: Record<string, string | undefined>;
4
- }
5
- /**
6
- * Tries to return a Git branch name from CI environment variables, falling back
7
- * to the local Git repository when the current working `dir` is supplied.
8
- */
9
- export declare const currentBranch: ({ dir, env, }?: CurrentBranchParameters) => Promise<string | undefined>;
10
- export {};
@@ -1,59 +0,0 @@
1
- "use strict";
2
- var __create = Object.create;
3
- var __defProp = Object.defineProperty;
4
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
- var __getOwnPropNames = Object.getOwnPropertyNames;
6
- var __getProtoOf = Object.getPrototypeOf;
7
- var __hasOwnProp = Object.prototype.hasOwnProperty;
8
- var __export = (target, all) => {
9
- for (var name in all)
10
- __defProp(target, name, { get: all[name], enumerable: true });
11
- };
12
- var __copyProps = (to, from, except, desc) => {
13
- if (from && typeof from === "object" || typeof from === "function") {
14
- for (let key of __getOwnPropNames(from))
15
- if (!__hasOwnProp.call(to, key) && key !== except)
16
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
- }
18
- return to;
19
- };
20
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
- // If the importer is in node compatibility mode or this is not an ESM
22
- // file that has been converted to a CommonJS file using a Babel-
23
- // compatible transform (i.e. "__esModule" has not been set), then set
24
- // "default" to the CommonJS "module.exports" for node compatibility.
25
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
- mod
27
- ));
28
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
- var currentBranch_exports = {};
30
- __export(currentBranch_exports, {
31
- currentBranch: () => currentBranch
32
- });
33
- module.exports = __toCommonJS(currentBranch_exports);
34
- var import_fs_extra = __toESM(require("fs-extra"));
35
- var import_isomorphic_git = __toESM(require("isomorphic-git"));
36
- const currentBranchFromEnvironment = (env = process.env) => env.BUILDKITE_BRANCH ?? env.GITHUB_HEAD_REF ?? env.GITHUB_REF_NAME;
37
- const currentBranch = async ({
38
- dir,
39
- env = process.env
40
- } = {}) => {
41
- const fromEnv = currentBranchFromEnvironment(env);
42
- if (fromEnv) {
43
- return fromEnv;
44
- }
45
- if (!dir) {
46
- return;
47
- }
48
- const gitRoot = await import_isomorphic_git.default.findRoot({ filepath: dir, fs: import_fs_extra.default });
49
- const fromRepo = await import_isomorphic_git.default.currentBranch({
50
- dir: gitRoot,
51
- fs: import_fs_extra.default
52
- });
53
- return fromRepo ?? void 0;
54
- };
55
- // Annotate the CommonJS export names for ESM import in node:
56
- 0 && (module.exports = {
57
- currentBranch
58
- });
59
- //# sourceMappingURL=currentBranch.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/api/git/currentBranch.ts"],
4
- "sourcesContent": ["import fs from 'fs-extra';\nimport git from 'isomorphic-git';\n\n/**\n * Tries to return a Git branch name from CI environment variables.\n */\nconst currentBranchFromEnvironment = (env = process.env): string | undefined =>\n env.BUILDKITE_BRANCH ?? env.GITHUB_HEAD_REF ?? env.GITHUB_REF_NAME;\n\ninterface CurrentBranchParameters {\n dir?: string;\n env?: Record<string, string | undefined>;\n}\n\n/**\n * Tries to return a Git branch name from CI environment variables, falling back\n * to the local Git repository when the current working `dir` is supplied.\n */\nexport const currentBranch = async ({\n dir,\n env = process.env,\n}: CurrentBranchParameters = {}): Promise<string | undefined> => {\n const fromEnv = currentBranchFromEnvironment(env);\n\n if (fromEnv) {\n return fromEnv;\n }\n\n if (!dir) {\n return;\n }\n\n const gitRoot = await git.findRoot({ filepath: dir, fs });\n\n const fromRepo = await git.currentBranch({\n dir: gitRoot,\n fs,\n });\n\n return fromRepo ?? undefined;\n};\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,sBAAe;AACf,4BAAgB;AAKhB,MAAM,+BAA+B,CAAC,MAAM,QAAQ,QAClD,IAAI,oBAAoB,IAAI,mBAAmB,IAAI;AAW9C,MAAM,gBAAgB,OAAO;AAAA,EAClC;AAAA,EACA,MAAM,QAAQ;AAChB,IAA6B,CAAC,MAAmC;AAC/D,QAAM,UAAU,6BAA6B,GAAG;AAEhD,MAAI,SAAS;AACX,WAAO;AAAA,EACT;AAEA,MAAI,CAAC,KAAK;AACR;AAAA,EACF;AAEA,QAAM,UAAU,MAAM,sBAAAA,QAAI,SAAS,EAAE,UAAU,KAAK,oBAAAC,QAAG,CAAC;AAExD,QAAM,WAAW,MAAM,sBAAAD,QAAI,cAAc;AAAA,IACvC,KAAK;AAAA,IACL,oBAAAC;AAAA,EACF,CAAC;AAED,SAAO,YAAY;AACrB;",
6
- "names": ["git", "fs"]
7
- }
@@ -1,9 +0,0 @@
1
- interface FindRootParameters {
2
- dir: string;
3
- }
4
- /**
5
- * Returns the first Git root directory encountered walking up from the provided
6
- * `dir`.
7
- */
8
- export declare const findRoot: ({ dir, }: FindRootParameters) => Promise<string | null>;
9
- export {};
@@ -1,52 +0,0 @@
1
- "use strict";
2
- var __create = Object.create;
3
- var __defProp = Object.defineProperty;
4
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
- var __getOwnPropNames = Object.getOwnPropertyNames;
6
- var __getProtoOf = Object.getPrototypeOf;
7
- var __hasOwnProp = Object.prototype.hasOwnProperty;
8
- var __export = (target, all) => {
9
- for (var name in all)
10
- __defProp(target, name, { get: all[name], enumerable: true });
11
- };
12
- var __copyProps = (to, from, except, desc) => {
13
- if (from && typeof from === "object" || typeof from === "function") {
14
- for (let key of __getOwnPropNames(from))
15
- if (!__hasOwnProp.call(to, key) && key !== except)
16
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
- }
18
- return to;
19
- };
20
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
- // If the importer is in node compatibility mode or this is not an ESM
22
- // file that has been converted to a CommonJS file using a Babel-
23
- // compatible transform (i.e. "__esModule" has not been set), then set
24
- // "default" to the CommonJS "module.exports" for node compatibility.
25
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
- mod
27
- ));
28
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
- var findRoot_exports = {};
30
- __export(findRoot_exports, {
31
- findRoot: () => findRoot
32
- });
33
- module.exports = __toCommonJS(findRoot_exports);
34
- var import_fs_extra = __toESM(require("fs-extra"));
35
- var import_isomorphic_git = __toESM(require("isomorphic-git"));
36
- const findRoot = async ({
37
- dir
38
- }) => {
39
- try {
40
- return await import_isomorphic_git.default.findRoot({ filepath: dir, fs: import_fs_extra.default });
41
- } catch (err) {
42
- if (err instanceof import_isomorphic_git.default.Errors.NotFoundError) {
43
- return null;
44
- }
45
- throw err;
46
- }
47
- };
48
- // Annotate the CommonJS export names for ESM import in node:
49
- 0 && (module.exports = {
50
- findRoot
51
- });
52
- //# sourceMappingURL=findRoot.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/api/git/findRoot.ts"],
4
- "sourcesContent": ["import fs from 'fs-extra';\nimport git from 'isomorphic-git';\n\ninterface FindRootParameters {\n dir: string;\n}\n\n/**\n * Returns the first Git root directory encountered walking up from the provided\n * `dir`.\n */\nexport const findRoot = async ({\n dir,\n}: FindRootParameters): Promise<string | null> => {\n try {\n return await git.findRoot({ filepath: dir, fs });\n } catch (err) {\n if (err instanceof git.Errors.NotFoundError) {\n return null;\n }\n\n throw err;\n }\n};\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,sBAAe;AACf,4BAAgB;AAUT,MAAM,WAAW,OAAO;AAAA,EAC7B;AACF,MAAkD;AAChD,MAAI;AACF,WAAO,MAAM,sBAAAA,QAAI,SAAS,EAAE,UAAU,KAAK,oBAAAC,QAAG,CAAC;AAAA,EACjD,SAAS,KAAK;AACZ,QAAI,eAAe,sBAAAD,QAAI,OAAO,eAAe;AAC3C,aAAO;AAAA,IACT;AAEA,UAAM;AAAA,EACR;AACF;",
6
- "names": ["git", "fs"]
7
- }
@@ -1,20 +0,0 @@
1
- type ChangedFileState = 'added' | 'modified' | 'deleted';
2
- export interface ChangedFile {
3
- path: string;
4
- state: ChangedFileState;
5
- }
6
- interface ChangedFilesParameters {
7
- dir: string;
8
- /**
9
- * File changes to exclude from the result.
10
- *
11
- * Defaults to `[]` (no exclusions).
12
- */
13
- ignore?: ChangedFile[];
14
- }
15
- /**
16
- * Returns all the files which have been added, modified or deleted in the
17
- * working directory of the local Git repository since the last commit.
18
- */
19
- export declare const getChangedFiles: ({ dir, ignore, }: ChangedFilesParameters) => Promise<ChangedFile[]>;
20
- export {};