Skip to content

Commit

Permalink
deps: skuba 7.5.0 (#17)
Browse files Browse the repository at this point in the history
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Adam Skoufis <[email protected]>
  • Loading branch information
renovate[bot] and askoufis authored Feb 25, 2024
1 parent 00a2e2b commit 07a2401
Show file tree
Hide file tree
Showing 8 changed files with 3,032 additions and 2,052 deletions.
7 changes: 6 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,12 @@ node_modules*/
/tmp*/

.DS_Store
.npmrc
npm-debug.log
yarn-error.log
# end managed by skuba

# Ignore .npmrc. This is no longer managed by skuba as pnpm projects use a managed .npmrc.
# IMPORTANT: if migrating to pnpm, remove this line and add an .npmrc IN THE SAME COMMIT.
# You can use `skuba format` to generate the file or otherwise commit an empty file.
# Doing so will conflict with a local .npmrc and make it more difficult to unintentionally commit auth secrets.
.npmrc
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
.vscode/*

.cdk.staging/
.pnpm-store/
.serverless/
cdk.out/
node_modules*/
Expand Down
8 changes: 7 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,16 @@ node_modules*/

.DS_Store
.eslintcache
.npmrc
.pnpm-debug.log
*.tgz
*.tsbuildinfo
npm-debug.log
package-lock.json
yarn-error.log
# end managed by skuba

# Ignore .npmrc. This is no longer managed by skuba as pnpm projects use a managed .npmrc.
# IMPORTANT: if migrating to pnpm, remove this line and add an .npmrc IN THE SAME COMMIT.
# You can use `skuba format` to generate the file or otherwise commit an empty file.
# Doing so will conflict with a local .npmrc and make it more difficult to unintentionally commit auth secrets.
.npmrc
14 changes: 1 addition & 13 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,20 +1,8 @@
# managed by skuba
.idea/*
.vscode/*

.cdk.staging/
.serverless/
cdk.out/
node_modules*/

/coverage*/
/dist*/
/lib*/
/tmp*/

# Gantry resource files support non-standard template syntax
/.gantry/**/*.yaml
/.gantry/**/*.yml
gantry*.yaml
gantry*.yml
pnpm-lock.yaml
# end managed by skuba
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"@types/node": "^20.11.16",
"prettier": "^2.8.1",
"resolve-from": "^5.0.0",
"skuba": "5.1.1",
"skuba": "7.5.0",
"tsup": "^8.0.1"
},
"volta": {
Expand All @@ -35,6 +35,6 @@
"entryPoint": "src/index.ts",
"template": null,
"type": "package",
"version": "4.3.0"
"version": "7.5.0"
}
}
2 changes: 1 addition & 1 deletion scripts/release.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { fileURLToPath } from 'url';

import { exec, getExecOutput } from '@actions/exec';

import pkg from '../package.json' assert { type: 'json' };
import pkg from '../package.json';

const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
Expand Down
13 changes: 10 additions & 3 deletions src/run.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as core from '@actions/core';
import { Package, getPackages } from '@manypkg/get-packages';
import { type Package, getPackages } from '@manypkg/get-packages';

import { execWithOutput } from './utils';

Expand All @@ -17,6 +17,10 @@ type PublishResult =
export const run = async ({ script, cwd = process.cwd() }: RunOptions) => {
const [runCommand, ...runArgs] = script.split(/\s+/);

if (!runCommand) {
throw new Error(`Error running script "${script}". No command found.`);
}

return execWithOutput(runCommand, runArgs, { cwd });
};

Expand All @@ -43,21 +47,24 @@ export const runPublish = async ({

for (const line of changesetPublishOutput.stdout.split('\n')) {
const match = line.match(newTagRegex);
if (match === null) {
if (!match?.[1]) {
continue;
}

const pkgName = match[1];

const pkg = packagesByName.get(pkgName);
if (pkg === undefined) {
throw new Error(
`Package "${pkgName}" not found.` +
' This is probably a bug in the action, please open an issue',
);
}

releasedPackages.push(pkg);
}
} else {
if (packages.length === 0) {
if (packages.length === 0 || !packages[0]) {
throw new Error(
'No package found.' +
' This is probably a bug in the action, please open an issue',
Expand Down
Loading

0 comments on commit 07a2401

Please sign in to comment.