@form8ion/github-workflows-core 6.0.0-beta.1 → 6.0.0-beta.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/index.js CHANGED
@@ -4,7 +4,7 @@ import { promises } from 'node:fs';
4
4
  function setupNode({versionDeterminedBy}) {
5
5
  return {
6
6
  name: 'Setup node',
7
- uses: 'actions/setup-node@v6.1.0',
7
+ uses: 'actions/setup-node@v6.3.0',
8
8
  with: {
9
9
  ...'nvmrc' === versionDeterminedBy && {'node-version-file': '.nvmrc'},
10
10
  // eslint-disable-next-line no-template-curly-in-string
@@ -27,7 +27,7 @@ function installDependencies() {
27
27
  }
28
28
 
29
29
  function checkout() {
30
- return {uses: 'actions/checkout@v6.0.1'};
30
+ return {uses: 'actions/checkout@v6.0.2'};
31
31
  }
32
32
 
33
33
  function existenceChecker ({projectRoot, name}) {
package/lib/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../src/steps/scaffolders.js","../src/workflow-file/existence-checker.js","../src/workflow-file/loader.js","../src/workflow-file/writer.js","../src/workflow-file/renamer.js","../src/tester.js","../src/steps/remover.js","../src/jobs/remover.js"],"sourcesContent":["export function setupNode({versionDeterminedBy}) {\n return {\n name: 'Setup node',\n uses: 'actions/setup-node@v6.1.0',\n with: {\n ...'nvmrc' === versionDeterminedBy && {'node-version-file': '.nvmrc'},\n // eslint-disable-next-line no-template-curly-in-string\n ...'matrix' === versionDeterminedBy && {'node-version': '${{ matrix.node }}'},\n cache: 'npm'\n }\n };\n}\n\nexport function executeVerification() {\n return {run: 'npm test'};\n}\n\nexport function installDependencies() {\n return [\n {run: 'npm clean-install'},\n {run: 'npm install --global corepack@latest'},\n {run: 'corepack npm audit signatures'}\n ];\n}\n\nexport function checkout() {\n return {uses: 'actions/checkout@v6.0.1'};\n}\n","import {fileExists} from '@form8ion/core';\n\nexport default function ({projectRoot, name}) {\n return fileExists(`${projectRoot}/.github/workflows/${name}.yml`);\n}\n","import {fileTypes, loadConfigFile} from '@form8ion/core';\n\nexport default function ({projectRoot, name}) {\n return loadConfigFile({path: `${projectRoot}/.github/workflows`, name, format: fileTypes.YAML});\n}\n","import {fileTypes, writeConfigFile} from '@form8ion/core';\n\nexport default function ({projectRoot, name, config}) {\n return writeConfigFile({path: `${projectRoot}/.github/workflows`, name, config, format: fileTypes.YAML});\n}\n","import {promises as fs} from 'node:fs';\n\nexport default function ({projectRoot, oldName, newName}) {\n return fs.rename(\n `${projectRoot}/.github/workflows/${oldName}.yml`,\n `${projectRoot}/.github/workflows/${newName}.yml`\n );\n}\n","import {directoryExists} from '@form8ion/core';\n\nexport default function ({projectRoot}) {\n return directoryExists(`${projectRoot}/.github/workflows`);\n}\n","export function removeActionFromSteps(steps, actionName) {\n return steps.filter(step => !step.uses?.includes(actionName));\n}\n","import {removeActionFromSteps} from '../steps/remover.js';\n\nexport function removeActionFromJobs(jobs, actionName) {\n return Object.fromEntries(\n Object.entries(jobs).map(([jobName, job]) => ([\n jobName,\n {\n ...job,\n ...job.steps && {steps: removeActionFromSteps(job.steps, actionName)}\n }\n ]))\n );\n}\n"],"names":["fs"],"mappings":";;;AAAO,SAAS,SAAS,CAAC,CAAC,mBAAmB,CAAC,EAAE;AACjD,EAAE,OAAO;AACT,IAAI,IAAI,EAAE,YAAY;AACtB,IAAI,IAAI,EAAE,2BAA2B;AACrC,IAAI,IAAI,EAAE;AACV,MAAM,GAAG,OAAO,KAAK,mBAAmB,IAAI,CAAC,mBAAmB,EAAE,QAAQ,CAAC;AAC3E;AACA,MAAM,GAAG,QAAQ,KAAK,mBAAmB,IAAI,CAAC,cAAc,EAAE,oBAAoB,CAAC;AACnF,MAAM,KAAK,EAAE;AACb;AACA,GAAG;AACH;;AAEO,SAAS,mBAAmB,GAAG;AACtC,EAAE,OAAO,CAAC,GAAG,EAAE,UAAU,CAAC;AAC1B;;AAEO,SAAS,mBAAmB,GAAG;AACtC,EAAE,OAAO;AACT,IAAI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SAAS,qBAAqB,CAAC,KAAK,EAAE,UAAU,EAAE;AACzD,EAAE,OAAO,KAAK,CAAC,MAAM,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,QAAQ,CAAC,UAAU,CAAC,CAAC;AAC/D;;ACAO,SAAS,oBAAoB,CAAC,IAAI,EAAE,UAAU,EAAE;AACvD,EAAE,OAAO,MAAM,CAAC,WAAW;AAC3B,IAAI,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,OAAO,EAAE,GAAG,CAAC,MAAM;AAClD,MAAM,OAAO;AACb,MAAM;AACN,QAAQ,GAAG,GAAG;AACd,QAAQ,GAAG,GAAG,CAAC,KAAK,IAAI,CAAC,KAAK,EAAE,qBAAqB,CAAC,GAAG,CAAC,KAAK,EAAE,UAAU,CAAC;AAC5E;AACA,KAAK,CAAC;AACN,GAAG;AACH;;;;"}
1
+ {"version":3,"file":"index.js","sources":["../src/steps/scaffolders.js","../src/workflow-file/existence-checker.js","../src/workflow-file/loader.js","../src/workflow-file/writer.js","../src/workflow-file/renamer.js","../src/tester.js","../src/steps/remover.js","../src/jobs/remover.js"],"sourcesContent":["export function setupNode({versionDeterminedBy}) {\n return {\n name: 'Setup node',\n uses: 'actions/setup-node@v6.3.0',\n with: {\n ...'nvmrc' === versionDeterminedBy && {'node-version-file': '.nvmrc'},\n // eslint-disable-next-line no-template-curly-in-string\n ...'matrix' === versionDeterminedBy && {'node-version': '${{ matrix.node }}'},\n cache: 'npm'\n }\n };\n}\n\nexport function executeVerification() {\n return {run: 'npm test'};\n}\n\nexport function installDependencies() {\n return [\n {run: 'npm clean-install'},\n {run: 'npm install --global corepack@latest'},\n {run: 'corepack npm audit signatures'}\n ];\n}\n\nexport function checkout() {\n return {uses: 'actions/checkout@v6.0.2'};\n}\n","import {fileExists} from '@form8ion/core';\n\nexport default function ({projectRoot, name}) {\n return fileExists(`${projectRoot}/.github/workflows/${name}.yml`);\n}\n","import {fileTypes, loadConfigFile} from '@form8ion/core';\n\nexport default function ({projectRoot, name}) {\n return loadConfigFile({path: `${projectRoot}/.github/workflows`, name, format: fileTypes.YAML});\n}\n","import {fileTypes, writeConfigFile} from '@form8ion/core';\n\nexport default function ({projectRoot, name, config}) {\n return writeConfigFile({path: `${projectRoot}/.github/workflows`, name, config, format: fileTypes.YAML});\n}\n","import {promises as fs} from 'node:fs';\n\nexport default function ({projectRoot, oldName, newName}) {\n return fs.rename(\n `${projectRoot}/.github/workflows/${oldName}.yml`,\n `${projectRoot}/.github/workflows/${newName}.yml`\n );\n}\n","import {directoryExists} from '@form8ion/core';\n\nexport default function ({projectRoot}) {\n return directoryExists(`${projectRoot}/.github/workflows`);\n}\n","export function removeActionFromSteps(steps, actionName) {\n return steps.filter(step => !step.uses?.includes(actionName));\n}\n","import {removeActionFromSteps} from '../steps/remover.js';\n\nexport function removeActionFromJobs(jobs, actionName) {\n return Object.fromEntries(\n Object.entries(jobs).map(([jobName, job]) => ([\n jobName,\n {\n ...job,\n ...job.steps && {steps: removeActionFromSteps(job.steps, actionName)}\n }\n ]))\n );\n}\n"],"names":["fs"],"mappings":";;;AAAO,SAAS,SAAS,CAAC,CAAC,mBAAmB,CAAC,EAAE;AACjD,EAAE,OAAO;AACT,IAAI,IAAI,EAAE,YAAY;AACtB,IAAI,IAAI,EAAE,2BAA2B;AACrC,IAAI,IAAI,EAAE;AACV,MAAM,GAAG,OAAO,KAAK,mBAAmB,IAAI,CAAC,mBAAmB,EAAE,QAAQ,CAAC;AAC3E;AACA,MAAM,GAAG,QAAQ,KAAK,mBAAmB,IAAI,CAAC,cAAc,EAAE,oBAAoB,CAAC;AACnF,MAAM,KAAK,EAAE;AACb;AACA,GAAG;AACH;;AAEO,SAAS,mBAAmB,GAAG;AACtC,EAAE,OAAO,CAAC,GAAG,EAAE,UAAU,CAAC;AAC1B;;AAEO,SAAS,mBAAmB,GAAG;AACtC,EAAE,OAAO;AACT,IAAI,CAAC,GAAG,EAAE,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,KAAK,EAAE,UAAU,EAAE;AACzD,EAAE,OAAO,KAAK,CAAC,MAAM,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,QAAQ,CAAC,UAAU,CAAC,CAAC;AAC/D;;ACAO,SAAS,oBAAoB,CAAC,IAAI,EAAE,UAAU,EAAE;AACvD,EAAE,OAAO,MAAM,CAAC,WAAW;AAC3B,IAAI,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,OAAO,EAAE,GAAG,CAAC,MAAM;AAClD,MAAM,OAAO;AACb,MAAM;AACN,QAAQ,GAAG,GAAG;AACd,QAAQ,GAAG,GAAG,CAAC,KAAK,IAAI,CAAC,KAAK,EAAE,qBAAqB,CAAC,GAAG,CAAC,KAAK,EAAE,UAAU,CAAC;AAC5E;AACA,KAAK,CAAC;AACN,GAAG;AACH;;;;"}
package/package.json CHANGED
@@ -2,10 +2,10 @@
2
2
  "name": "@form8ion/github-workflows-core",
3
3
  "description": "core functionality for form8ion plugins that manage github workflows",
4
4
  "license": "MIT",
5
- "version": "6.0.0-beta.1",
5
+ "version": "6.0.0-beta.2",
6
6
  "type": "module",
7
7
  "engines": {
8
- "node": "^18.17 || >=20.6.1"
8
+ "node": "^20.19.0 || >=22.14.0"
9
9
  },
10
10
  "author": "Matt Travi <npm@travi.org> (https://matt.travi.org)",
11
11
  "repository": "form8ion/github-workflows-core",
@@ -55,38 +55,38 @@
55
55
  "access": "public",
56
56
  "provenance": true
57
57
  },
58
- "packageManager": "npm@11.7.0+sha512.c22099a6fff8d5b2286c2a09df5352b4858a7c0c716320f58989d60ad8b29ecf2ce6fdfe97ccb41c23ffb1272e1fa079f868487dd6b81d02a2a9e199c095a117",
58
+ "packageManager": "npm@11.11.1+sha512.6ac6b30a876415dcf545e433ba4cb34bf0c3efbb86088a9415e446de0b5a4fc6fd511d277b59bd40e06e3204fbda28f5aeded346b3a8c780355b39ed31622e12",
59
59
  "dependencies": {
60
60
  "@form8ion/core": "^4.7.1"
61
61
  },
62
62
  "devDependencies": {
63
63
  "@cucumber/cucumber": "11.3.0",
64
- "@form8ion/commitlint-config": "2.0.8",
65
- "@form8ion/eslint-config": "7.0.13",
64
+ "@form8ion/commitlint-config": "2.0.9",
65
+ "@form8ion/eslint-config": "7.0.14",
66
66
  "@form8ion/eslint-config-cucumber": "1.4.1",
67
67
  "@form8ion/eslint-config-mocha": "3.0.6",
68
- "@form8ion/eslint-config-vitest": "1.0.0",
68
+ "@form8ion/eslint-config-vitest": "1.1.0",
69
69
  "@form8ion/remark-lint-preset": "6.0.7",
70
70
  "@travi/any": "3.1.3",
71
71
  "ban-sensitive-files": "1.10.11",
72
- "c8": "10.1.3",
72
+ "c8": "11.0.0",
73
73
  "cross-env": "10.1.0",
74
74
  "cz-conventional-changelog": "3.3.0",
75
75
  "gherkin-lint": "4.2.4",
76
76
  "husky": "9.1.7",
77
- "lockfile-lint": "4.14.1",
77
+ "lockfile-lint": "5.0.0",
78
78
  "lodash.zip": "4.2.0",
79
79
  "ls-engines": "0.9.4",
80
80
  "mock-fs": "5.5.0",
81
81
  "npm-run-all2": "8.0.4",
82
- "publint": "0.3.16",
82
+ "publint": "0.3.18",
83
83
  "remark-cli": "12.0.1",
84
84
  "remark-toc": "9.0.0",
85
85
  "remark-usage": "11.0.1",
86
- "rimraf": "6.1.2",
87
- "rollup": "4.54.0",
86
+ "rimraf": "6.1.3",
87
+ "rollup": "4.59.0",
88
88
  "rollup-plugin-auto-external": "2.0.0",
89
- "vitest": "4.0.16",
89
+ "vitest": "4.0.18",
90
90
  "vitest-when": "0.10.0"
91
91
  }
92
92
  }
@@ -1,7 +1,7 @@
1
1
  export function setupNode({versionDeterminedBy}) {
2
2
  return {
3
3
  name: 'Setup node',
4
- uses: 'actions/setup-node@v6.1.0',
4
+ uses: 'actions/setup-node@v6.3.0',
5
5
  with: {
6
6
  ...'nvmrc' === versionDeterminedBy && {'node-version-file': '.nvmrc'},
7
7
  // eslint-disable-next-line no-template-curly-in-string
@@ -24,5 +24,5 @@ export function installDependencies() {
24
24
  }
25
25
 
26
26
  export function checkout() {
27
- return {uses: 'actions/checkout@v6.0.1'};
27
+ return {uses: 'actions/checkout@v6.0.2'};
28
28
  }
@@ -4,13 +4,13 @@ import {checkout, executeVerification, installDependencies, setupNode} from './s
4
4
 
5
5
  describe('step scaffolders', () => {
6
6
  it('should scaffold the details of the checkout step', () => {
7
- expect(checkout()).toEqual({uses: 'actions/checkout@v6.0.1'});
7
+ expect(checkout()).toEqual({uses: 'actions/checkout@v6.0.2'});
8
8
  });
9
9
 
10
10
  it('should set up node correctly when the version is determined from the `.nvmrc`', () => {
11
11
  expect(setupNode({versionDeterminedBy: 'nvmrc'})).toEqual({
12
12
  name: 'Setup node',
13
- uses: 'actions/setup-node@v6.1.0',
13
+ uses: 'actions/setup-node@v6.3.0',
14
14
  with: {'node-version-file': '.nvmrc', cache: 'npm'}
15
15
  });
16
16
  });
@@ -18,7 +18,7 @@ describe('step scaffolders', () => {
18
18
  it('should set up node correctly when the version is determined based on a matrix', () => {
19
19
  expect(setupNode({versionDeterminedBy: 'matrix'})).toEqual({
20
20
  name: 'Setup node',
21
- uses: 'actions/setup-node@v6.1.0',
21
+ uses: 'actions/setup-node@v6.3.0',
22
22
  // eslint-disable-next-line no-template-curly-in-string
23
23
  with: {'node-version': '${{ matrix.node }}', cache: 'npm'}
24
24
  });