semantic-release-pub 0.10.8 → 0.10.10

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/README.md CHANGED
@@ -5,7 +5,7 @@
5
5
  [![GitHub Actions](https://github.com/zeshuaro/semantic-release-pub/actions/workflows/github-actions.yml/badge.svg)](https://github.com/zeshuaro/semantic-release-pub/actions/workflows/github-actions.yml)
6
6
  [![codecov](https://codecov.io/github/zeshuaro/semantic-release-pub/graph/badge.svg?token=P40ZNZNXG2)](https://codecov.io/github/zeshuaro/semantic-release-pub)
7
7
  [![Codacy Badge](https://app.codacy.com/project/badge/Grade/2694cc48a8dd416798eaab232948090a)](https://app.codacy.com/gh/zeshuaro/semantic-release-pub/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_grade)
8
- [![Code Style](https://img.shields.io/badge/code_style-prettier-ff69b4.svg)](https://github.com/prettier/prettier)
8
+ [![Checked with Biome](https://img.shields.io/badge/Checked_with-Biome-60a5fa?style=flat&logo=biome)](https://biomejs.dev)
9
9
 
10
10
  [![Github-sponsors](https://img.shields.io/badge/sponsor-30363D?style=for-the-badge&logo=GitHub-Sponsors&logoColor=#EA4AAA)](https://github.com/sponsors/zeshuaro)
11
11
  [![BuyMeACoffee](https://img.shields.io/badge/Buy%20Me%20a%20Coffee-ffdd00?style=for-the-badge&logo=buy-me-a-coffee&logoColor=black)](https://www.buymeacoffee.com/zeshuaro)
package/dist/prepare.d.ts CHANGED
@@ -1,3 +1,3 @@
1
- import { PrepareContext } from "semantic-release";
2
- import { PluginConfig } from "./types.js";
1
+ import type { PrepareContext } from "semantic-release";
2
+ import type { PluginConfig } from "./types.js";
3
3
  export declare const prepare: (pluginConfig: PluginConfig, { nextRelease: { version }, logger }: PrepareContext) => Promise<void>;
package/dist/prepare.js CHANGED
@@ -1,5 +1,5 @@
1
+ import { writeFileSync } from "node:fs";
1
2
  import SemanticReleaseError from "@semantic-release/error";
2
- import { writeFileSync } from "fs";
3
3
  import { PUBSPEC_PATH, getConfig, getPubspecFromString, getPubspecString, } from "./utils.js";
4
4
  export const prepare = async (pluginConfig, { nextRelease: { version }, logger }) => {
5
5
  const { updateBuildNumber } = getConfig(pluginConfig);
@@ -10,7 +10,7 @@ export const prepare = async (pluginConfig, { nextRelease: { version }, logger }
10
10
  if (updateBuildNumber) {
11
11
  const parts = pubspec.version.split("+");
12
12
  const buildNumber = parts.length > 1 ? Number(parts[1]) : 0;
13
- if (isNaN(buildNumber)) {
13
+ if (Number.isNaN(buildNumber)) {
14
14
  throw new SemanticReleaseError(`Invalid build number: ${buildNumber} in ${pubspec.version}`);
15
15
  }
16
16
  nextVersion = `${version}+${buildNumber + 1}`;
package/dist/publish.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { PublishContext } from "semantic-release";
2
- import { PluginConfig } from "./types.js";
1
+ import type { PublishContext } from "semantic-release";
2
+ import type { PluginConfig } from "./types.js";
3
3
  export declare const publish: (pluginConfig: PluginConfig, { nextRelease: { version }, logger }: PublishContext) => Promise<{
4
4
  name: string;
5
5
  url: string;
package/dist/utils.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { PluginConfig } from "./types.js";
1
+ import type { PluginConfig } from "./types.js";
2
2
  export declare const PUBSPEC_PATH = "pubspec.yaml";
3
3
  export declare const getConfig: (config: PluginConfig) => PluginConfig;
4
4
  export declare const getGoogleIdentityToken: (serviceAccountStr: string) => Promise<string>;
package/dist/utils.js CHANGED
@@ -1,6 +1,6 @@
1
+ import { readFileSync } from "node:fs";
1
2
  import core from "@actions/core";
2
3
  import SemanticReleaseError from "@semantic-release/error";
3
- import { readFileSync } from "fs";
4
4
  import { JWT } from "google-auth-library";
5
5
  import { parse } from "yaml";
6
6
  import { Pubspec, ServiceAccount } from "./schemas.js";
@@ -1,3 +1,3 @@
1
- import { VerifyConditionsContext } from "semantic-release";
2
- import { PluginConfig } from "./types.js";
1
+ import type { VerifyConditionsContext } from "semantic-release";
2
+ import type { PluginConfig } from "./types.js";
3
3
  export declare const verifyConditions: (pluginConfig: PluginConfig, { logger }: VerifyConditionsContext) => Promise<void>;
@@ -25,9 +25,7 @@ const verifyPublishToken = async (useGithubOidc) => {
25
25
  if (!GOOGLE_SERVICE_ACCOUNT_KEY) {
26
26
  throw new SemanticReleaseError("Environment variable not found: GOOGLE_SERVICE_ACCOUNT_KEY");
27
27
  }
28
- else {
29
- await getGoogleIdentityToken(GOOGLE_SERVICE_ACCOUNT_KEY);
30
- }
28
+ await getGoogleIdentityToken(GOOGLE_SERVICE_ACCOUNT_KEY);
31
29
  }
32
30
  };
33
31
  const verifyCommand = async (command) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "semantic-release-pub",
3
- "version": "0.10.8",
3
+ "version": "0.10.10",
4
4
  "description": "semantic-release plugin to publish a Dart or Flutter package",
5
5
  "main": "dist/index.js",
6
6
  "author": "zeshuaro@gmail.com",
@@ -25,8 +25,8 @@
25
25
  "scripts": {
26
26
  "build": "tsc",
27
27
  "test": "vitest run tests --coverage",
28
- "lint": "ESLINT_USE_FLAT_CONFIG=false eslint --ext .ts src tests && prettier --check src/**/*.ts tests/**/*.ts",
29
- "format": "ESLINT_USE_FLAT_CONFIG=false eslint --ext .ts --fix src tests && prettier --write src/**/*.ts tests/**/*.ts"
28
+ "lint": "biome check src tests",
29
+ "lint:write": "biome check src tests --write"
30
30
  },
31
31
  "engines": {
32
32
  "node": ">=22.16.0"
@@ -37,31 +37,22 @@
37
37
  "execa": "^9.6.0",
38
38
  "google-auth-library": "^9.15.1",
39
39
  "yaml": "^2.8.0",
40
- "zod": "^3.25.33"
40
+ "zod": "^3.25.62"
41
41
  },
42
42
  "devDependencies": {
43
+ "@biomejs/biome": "1.9.4",
43
44
  "@semantic-release/changelog": "6.0.3",
44
45
  "@semantic-release/git": "10.0.1",
45
46
  "@types/common-tags": "1.8.4",
46
47
  "@types/semantic-release": "20.0.6",
47
48
  "@types/semantic-release__error": "3.0.3",
48
49
  "@types/signale": "1.4.7",
49
- "@typescript-eslint/eslint-plugin": "8.33.0",
50
- "@typescript-eslint/parser": "8.33.0",
51
- "@vitest/coverage-v8": "3.1.4",
50
+ "@vitest/coverage-v8": "3.2.3",
52
51
  "common-tags": "1.8.2",
53
52
  "conventional-changelog-conventionalcommits": "9.0.0",
54
- "eslint": "9.27.0",
55
- "eslint-config-prettier": "^10.1.5",
56
- "eslint-config-semistandard": "17.0.0",
57
- "eslint-config-standard": "17.1.0",
58
- "eslint-plugin-import": "2.31.0",
59
- "eslint-plugin-n": "17.18.0",
60
- "eslint-plugin-promise": "7.2.1",
61
- "prettier": "3.5.3",
62
53
  "semantic-release": "24.2.5",
63
54
  "typescript": "5.8.3",
64
- "vitest": "3.1.4",
55
+ "vitest": "3.2.3",
65
56
  "vitest-mock-extended": "3.1.0"
66
57
  }
67
58
  }