From c787584b123f0884e52fd43aaf49a1f655d28c10 Mon Sep 17 00:00:00 2001 From: "woodpecker[bot]" Date: Sat, 22 Feb 2025 15:51:56 +0000 Subject: [PATCH 01/10] chore(release): 2.0.1 --- package.json | 2 +- system.json | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index 7bc8aca9..a5bb6ade 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "private": true, "name": "dungeonslayers4", "description": "An implementation of the Dungeonslayers 4 game system for Foundry Virtual Tabletop.", - "version": "2.0.0", + "version": "2.0.1", "license": "https://git.f3l.de/dungeonslayers/ds4#licensing", "homepage": "https://git.f3l.de/dungeonslayers/ds4", "repository": { diff --git a/system.json b/system.json index 0a99c901..a8b73fdb 100644 --- a/system.json +++ b/system.json @@ -28,11 +28,11 @@ "name": "Sascha Martens" } ], - "license": "https://git.f3l.de/dungeonslayers/ds4/raw/tag/2.0.0/LICENSE.md", - "readme": "https://git.f3l.de/dungeonslayers/ds4/raw/tag/2.0.0/README.md", + "license": "https://git.f3l.de/dungeonslayers/ds4/raw/tag/2.0.1/LICENSE.md", + "readme": "https://git.f3l.de/dungeonslayers/ds4/raw/tag/2.0.1/README.md", "bugs": "https://git.f3l.de/dungeonslayers/ds4/issues", - "changelog": "https://git.f3l.de/dungeonslayers/ds4/releases/tag/2.0.0", - "version": "2.0.0", + "changelog": "https://git.f3l.de/dungeonslayers/ds4/releases/tag/2.0.1", + "version": "2.0.1", "flags": { "hotReload": { "extensions": ["css", "hbs", "json"], @@ -116,7 +116,7 @@ } ], "manifest": "https://git.f3l.de/api/packages/dungeonslayers/generic/ds4/latest/system.json", - "download": "https://git.f3l.de/dungeonslayers/ds4/releases/download/2.0.0/ds4.zip", + "download": "https://git.f3l.de/dungeonslayers/ds4/releases/download/2.0.1/ds4.zip", "initiative": "@combatValues.initiative.total", "grid": { "distance": 1, From a41902570574f8c7cd25f5eb7326d339873a9de0 Mon Sep 17 00:00:00 2001 From: Johannes Loher Date: Sat, 22 Feb 2025 17:03:08 +0100 Subject: [PATCH 02/10] ci: bump foundry-publish to v3.0.1 --- .woodpecker/publish.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.woodpecker/publish.yaml b/.woodpecker/publish.yaml index cb9ac480..a82afd91 100644 --- a/.woodpecker/publish.yaml +++ b/.woodpecker/publish.yaml @@ -99,7 +99,7 @@ steps: - forge_token publish-to-foundry-admin: group: publish - image: johannesloher/foundry-publish + image: johannesloher/foundry-publish:v3.0.1 environment: FVTT_DELETE_OBSOLETE_VERSIONS: "true" commands: From 318a821e6b00990a19ab3417a368200018ecf861 Mon Sep 17 00:00:00 2001 From: "woodpecker[bot]" Date: Sat, 22 Feb 2025 16:06:42 +0000 Subject: [PATCH 03/10] chore(release): 2.0.2 --- package.json | 2 +- system.json | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index a5bb6ade..e3048a08 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "private": true, "name": "dungeonslayers4", "description": "An implementation of the Dungeonslayers 4 game system for Foundry Virtual Tabletop.", - "version": "2.0.1", + "version": "2.0.2", "license": "https://git.f3l.de/dungeonslayers/ds4#licensing", "homepage": "https://git.f3l.de/dungeonslayers/ds4", "repository": { diff --git a/system.json b/system.json index a8b73fdb..023720ba 100644 --- a/system.json +++ b/system.json @@ -28,11 +28,11 @@ "name": "Sascha Martens" } ], - "license": "https://git.f3l.de/dungeonslayers/ds4/raw/tag/2.0.1/LICENSE.md", - "readme": "https://git.f3l.de/dungeonslayers/ds4/raw/tag/2.0.1/README.md", + "license": "https://git.f3l.de/dungeonslayers/ds4/raw/tag/2.0.2/LICENSE.md", + "readme": "https://git.f3l.de/dungeonslayers/ds4/raw/tag/2.0.2/README.md", "bugs": "https://git.f3l.de/dungeonslayers/ds4/issues", - "changelog": "https://git.f3l.de/dungeonslayers/ds4/releases/tag/2.0.1", - "version": "2.0.1", + "changelog": "https://git.f3l.de/dungeonslayers/ds4/releases/tag/2.0.2", + "version": "2.0.2", "flags": { "hotReload": { "extensions": ["css", "hbs", "json"], @@ -116,7 +116,7 @@ } ], "manifest": "https://git.f3l.de/api/packages/dungeonslayers/generic/ds4/latest/system.json", - "download": "https://git.f3l.de/dungeonslayers/ds4/releases/download/2.0.1/ds4.zip", + "download": "https://git.f3l.de/dungeonslayers/ds4/releases/download/2.0.2/ds4.zip", "initiative": "@combatValues.initiative.total", "grid": { "distance": 1, From 0e74e43b9181f427d0d0a2c018a29a5666724faf Mon Sep 17 00:00:00 2001 From: Johannes Loher Date: Sat, 22 Feb 2025 20:50:06 +0100 Subject: [PATCH 04/10] chore: cleanup config files --- .eslintrc.cjs | 15 --------------- commitlint.config.cjs | 5 ----- commitlint.config.js | 8 ++++++++ package.json | 7 ++++++- .prettierrc.js => prettier.config.js | 5 +++++ 5 files changed, 19 insertions(+), 21 deletions(-) delete mode 100644 .eslintrc.cjs delete mode 100644 commitlint.config.cjs create mode 100644 commitlint.config.js rename .prettierrc.js => prettier.config.js (76%) diff --git a/.eslintrc.cjs b/.eslintrc.cjs deleted file mode 100644 index 25a76ab4..00000000 --- a/.eslintrc.cjs +++ /dev/null @@ -1,15 +0,0 @@ -// SPDX-FileCopyrightText: 2021 Johannes Loher -// -// SPDX-License-Identifier: MIT - -module.exports = { - parser: "@typescript-eslint/parser", - parserOptions: { ecmaVersion: 2020, sourceType: "module" }, - env: { browser: true }, - extends: ["plugin:@typescript-eslint/recommended", "prettier"], - plugins: ["@typescript-eslint"], - overrides: [ - { files: ["./*.cjs"], rules: { "@typescript-eslint/no-var-requires": "off" } }, - { files: ["./spec/**/*"], env: { browser: false } }, - ], -}; diff --git a/commitlint.config.cjs b/commitlint.config.cjs deleted file mode 100644 index c52644d5..00000000 --- a/commitlint.config.cjs +++ /dev/null @@ -1,5 +0,0 @@ -// SPDX-FileCopyrightText: 2021 Johannes Loher -// -// SPDX-License-Identifier: MIT - -module.exports = { extends: ["@commitlint/config-conventional"] }; diff --git a/commitlint.config.js b/commitlint.config.js new file mode 100644 index 00000000..7401f777 --- /dev/null +++ b/commitlint.config.js @@ -0,0 +1,8 @@ +// SPDX-FileCopyrightText: 2021 Johannes Loher +// +// SPDX-License-Identifier: MIT + +/** + * @type {import("@commitlint/types").UserConfig} + */ +export default { extends: ["@commitlint/config-conventional"] }; diff --git a/package.json b/package.json index e3048a08..f1e78aa4 100644 --- a/package.json +++ b/package.json @@ -93,5 +93,10 @@ "vitest": "3.0.6", "yargs": "17.7.2" }, - "packageManager": "pnpm@10.4.1" + "packageManager": "pnpm@10.4.1", + "pnpm": { + "onlyBuiltDependencies": [ + "@swc/core" + ] + } } diff --git a/.prettierrc.js b/prettier.config.js similarity index 76% rename from .prettierrc.js rename to prettier.config.js index d6ceb41d..c75da361 100644 --- a/.prettierrc.js +++ b/prettier.config.js @@ -2,6 +2,11 @@ // // SPDX-License-Identifier: MIT +// @ts-check + +/** + * @type {import("prettier").Config} + */ export default { semi: true, trailingComma: "all", From 3f6e0baa519e310b77fe0a078dbddf6eea81e081 Mon Sep 17 00:00:00 2001 From: Johannes Loher Date: Sat, 22 Feb 2025 20:50:52 +0100 Subject: [PATCH 05/10] ci: bump foundry-publish --- .woodpecker/publish.yaml | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/.woodpecker/publish.yaml b/.woodpecker/publish.yaml index a82afd91..6f2152a8 100644 --- a/.woodpecker/publish.yaml +++ b/.woodpecker/publish.yaml @@ -99,16 +99,13 @@ steps: - forge_token publish-to-foundry-admin: group: publish - image: johannesloher/foundry-publish:v3.0.1 - environment: - FVTT_DELETE_OBSOLETE_VERSIONS: "true" + image: johannesloher/foundry-publish:v4.0.0 commands: - export FVTT_MANIFEST_PATH=${CI_REPO_NAME}/system.json - export FVTT_MANIFEST_URL=${CI_REPO_URL}/releases/download/${CI_COMMIT_TAG}/system.json - foundry-publish secrets: - fvtt_package_id - - fvtt_username - - fvtt_password + - fvtt_token when: <<: *is_latest_channel From 79723e278eae818235a57de37bc8c25076e8a634 Mon Sep 17 00:00:00 2001 From: Johannes Loher Date: Sat, 22 Feb 2025 20:57:43 +0100 Subject: [PATCH 06/10] ci: improve publish workflow --- .woodpecker/publish.yaml | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/.woodpecker/publish.yaml b/.woodpecker/publish.yaml index 6f2152a8..05d7e912 100644 --- a/.woodpecker/publish.yaml +++ b/.woodpecker/publish.yaml @@ -38,6 +38,7 @@ steps: - <<: *enable_pnpm - pnpm install --frozen-lockfile build: + depends_on: install image: *node_image environment: NODE_ENV: production @@ -46,7 +47,7 @@ steps: - <<: *enable_pnpm - pnpm build package: - group: prepare-release + depends_on: build image: alpine:latest commands: - apk update @@ -54,32 +55,34 @@ steps: - mv dist ${CI_REPO_NAME} - zip -r ${CI_REPO_NAME}.zip ${CI_REPO_NAME}/* changelog: - group: prepare-release + depends_on: build image: *node_image commands: - <<: *enable_pnpm - pnpm changelog choose-latest-channel: - group: prepare-release + depends_on: build image: alpine:latest commands: - echo latest > .RELEASE_CHANNEL when: <<: *is_latest_channel choose-beta-channel: - group: prepare-release + depends_on: build image: alpine:latest commands: - echo beta > .RELEASE_CHANNEL when: <<: *is_beta_channel release-latest: + depends_on: choose-latest-channel image: *release_plugin settings: <<: *release_base_settings when: <<: *is_latest_channel release-beta: + depends_on: choose-beta-channel image: *release_plugin settings: <<: *release_base_settings @@ -87,7 +90,7 @@ steps: when: <<: *is_beta_channel publish-manifest: - group: publish + depends_on: [release-latest, release-beta] image: alpine:latest commands: - apk update @@ -98,7 +101,7 @@ steps: secrets: - forge_token publish-to-foundry-admin: - group: publish + depends_on: [release-latest, release-beta] image: johannesloher/foundry-publish:v4.0.0 commands: - export FVTT_MANIFEST_PATH=${CI_REPO_NAME}/system.json From 99e3cc88c389add0ea6d8ef07facc65d3a40dbed Mon Sep 17 00:00:00 2001 From: "woodpecker[bot]" Date: Sat, 22 Feb 2025 19:59:46 +0000 Subject: [PATCH 07/10] chore(release): 2.0.3 --- package.json | 2 +- system.json | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index f1e78aa4..e5f7869d 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "private": true, "name": "dungeonslayers4", "description": "An implementation of the Dungeonslayers 4 game system for Foundry Virtual Tabletop.", - "version": "2.0.2", + "version": "2.0.3", "license": "https://git.f3l.de/dungeonslayers/ds4#licensing", "homepage": "https://git.f3l.de/dungeonslayers/ds4", "repository": { diff --git a/system.json b/system.json index 023720ba..5541d96a 100644 --- a/system.json +++ b/system.json @@ -28,11 +28,11 @@ "name": "Sascha Martens" } ], - "license": "https://git.f3l.de/dungeonslayers/ds4/raw/tag/2.0.2/LICENSE.md", - "readme": "https://git.f3l.de/dungeonslayers/ds4/raw/tag/2.0.2/README.md", + "license": "https://git.f3l.de/dungeonslayers/ds4/raw/tag/2.0.3/LICENSE.md", + "readme": "https://git.f3l.de/dungeonslayers/ds4/raw/tag/2.0.3/README.md", "bugs": "https://git.f3l.de/dungeonslayers/ds4/issues", - "changelog": "https://git.f3l.de/dungeonslayers/ds4/releases/tag/2.0.2", - "version": "2.0.2", + "changelog": "https://git.f3l.de/dungeonslayers/ds4/releases/tag/2.0.3", + "version": "2.0.3", "flags": { "hotReload": { "extensions": ["css", "hbs", "json"], @@ -116,7 +116,7 @@ } ], "manifest": "https://git.f3l.de/api/packages/dungeonslayers/generic/ds4/latest/system.json", - "download": "https://git.f3l.de/dungeonslayers/ds4/releases/download/2.0.2/ds4.zip", + "download": "https://git.f3l.de/dungeonslayers/ds4/releases/download/2.0.3/ds4.zip", "initiative": "@combatValues.initiative.total", "grid": { "distance": 1, From 0e6508ac07a02c59f855c53744cf3b7f5ddcd3a7 Mon Sep 17 00:00:00 2001 From: "woodpecker[bot]" Date: Sat, 22 Feb 2025 20:02:58 +0000 Subject: [PATCH 08/10] chore(release): 2.0.4 --- package.json | 2 +- system.json | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index e5f7869d..bdcd0a62 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "private": true, "name": "dungeonslayers4", "description": "An implementation of the Dungeonslayers 4 game system for Foundry Virtual Tabletop.", - "version": "2.0.3", + "version": "2.0.4", "license": "https://git.f3l.de/dungeonslayers/ds4#licensing", "homepage": "https://git.f3l.de/dungeonslayers/ds4", "repository": { diff --git a/system.json b/system.json index 5541d96a..b0c8a6ff 100644 --- a/system.json +++ b/system.json @@ -28,11 +28,11 @@ "name": "Sascha Martens" } ], - "license": "https://git.f3l.de/dungeonslayers/ds4/raw/tag/2.0.3/LICENSE.md", - "readme": "https://git.f3l.de/dungeonslayers/ds4/raw/tag/2.0.3/README.md", + "license": "https://git.f3l.de/dungeonslayers/ds4/raw/tag/2.0.4/LICENSE.md", + "readme": "https://git.f3l.de/dungeonslayers/ds4/raw/tag/2.0.4/README.md", "bugs": "https://git.f3l.de/dungeonslayers/ds4/issues", - "changelog": "https://git.f3l.de/dungeonslayers/ds4/releases/tag/2.0.3", - "version": "2.0.3", + "changelog": "https://git.f3l.de/dungeonslayers/ds4/releases/tag/2.0.4", + "version": "2.0.4", "flags": { "hotReload": { "extensions": ["css", "hbs", "json"], @@ -116,7 +116,7 @@ } ], "manifest": "https://git.f3l.de/api/packages/dungeonslayers/generic/ds4/latest/system.json", - "download": "https://git.f3l.de/dungeonslayers/ds4/releases/download/2.0.3/ds4.zip", + "download": "https://git.f3l.de/dungeonslayers/ds4/releases/download/2.0.4/ds4.zip", "initiative": "@combatValues.initiative.total", "grid": { "distance": 1, From dbef065579a5b8077d5d080087e733db80ea2db9 Mon Sep 17 00:00:00 2001 From: Johannes Loher Date: Sat, 22 Feb 2025 22:02:19 +0100 Subject: [PATCH 09/10] ci: fix publish workflow --- .woodpecker/publish.yaml | 52 +++++++++++++++++++++++++++------------- .woodpecker/release.yaml | 8 ++++--- 2 files changed, 40 insertions(+), 20 deletions(-) diff --git a/.woodpecker/publish.yaml b/.woodpecker/publish.yaml index 05d7e912..5cdef92e 100644 --- a/.woodpecker/publish.yaml +++ b/.woodpecker/publish.yaml @@ -23,6 +23,17 @@ variables: - ${CI_REPO_NAME}/system.json api_key: from_secret: forge_token + - &publish_manifest_base + image: alpine:latest + environment: + FORGE_TOKEN: + from_secret: forge_token + commands: + - apk update + - apk add curl + - export RELEASE_CHANNEL=$(cat .RELEASE_CHANNEL) + - 'curl --header "Authorization: token $${FORGE_TOKEN}" -X "DELETE" "${CI_FORGE_URL}/api/packages/${CI_REPO_OWNER}/generic/${CI_REPO_NAME}/$${RELEASE_CHANNEL}/system.json"' + - 'curl --fail --header "Authorization: token $${FORGE_TOKEN}" --upload-file ${CI_REPO_NAME}/system.json "${CI_FORGE_URL}/api/packages/${CI_REPO_OWNER}/generic/${CI_REPO_NAME}/$${RELEASE_CHANNEL}/system.json"' when: event: tag @@ -75,40 +86,47 @@ steps: when: <<: *is_beta_channel release-latest: - depends_on: choose-latest-channel + depends_on: + - package + - changelog + - choose-latest-channel image: *release_plugin settings: <<: *release_base_settings when: <<: *is_latest_channel release-beta: - depends_on: choose-beta-channel + depends_on: + - package + - changelog + - choose-beta-channel image: *release_plugin settings: <<: *release_base_settings prerelease: true when: <<: *is_beta_channel - publish-manifest: - depends_on: [release-latest, release-beta] - image: alpine:latest - commands: - - apk update - - apk add curl - - export RELEASE_CHANNEL=$(cat .RELEASE_CHANNEL) - - 'curl --header "Authorization: token $${FORGE_TOKEN}" -X "DELETE" "${CI_FORGE_URL}/api/packages/${CI_REPO_OWNER}/generic/${CI_REPO_NAME}/$${RELEASE_CHANNEL}/system.json"' - - 'curl --fail --header "Authorization: token $${FORGE_TOKEN}" --upload-file ${CI_REPO_NAME}/system.json "${CI_FORGE_URL}/api/packages/${CI_REPO_OWNER}/generic/${CI_REPO_NAME}/$${RELEASE_CHANNEL}/system.json"' - secrets: - - forge_token + publish-manifest-latest: + <<: *publish_manifest_base + depends_on: release-latest + when: + <<: *is_latest_channel + publish-manifest-beta: + <<: *publish_manifest_base + depends_on: release-beta + when: + <<: *is_beta_channel publish-to-foundry-admin: - depends_on: [release-latest, release-beta] + depends_on: release-latest image: johannesloher/foundry-publish:v4.0.0 + environment: + FVTT_PACKAGE_ID: + from_secret: fvtt_package_id + FVTT_TOKEN: + from_secret: fvtt_token commands: - export FVTT_MANIFEST_PATH=${CI_REPO_NAME}/system.json - export FVTT_MANIFEST_URL=${CI_REPO_URL}/releases/download/${CI_COMMIT_TAG}/system.json - foundry-publish - secrets: - - fvtt_package_id - - fvtt_token when: <<: *is_latest_channel diff --git a/.woodpecker/release.yaml b/.woodpecker/release.yaml index fce1dbdb..17966857 100644 --- a/.woodpecker/release.yaml +++ b/.woodpecker/release.yaml @@ -25,6 +25,11 @@ steps: - pnpm install --frozen-lockfile release: image: *node_image + environment: + FORGE_TOKEN_NAME: + from_secret: forge_token_name + FORGE_TOKEN: + from_secret: forge_token commands: - <<: *enable_pnpm - apt-get update @@ -42,6 +47,3 @@ steps: - git tag -f $${RELEASE_VERSION} - git push origin ${CI_COMMIT_BRANCH} - git push origin $${RELEASE_VERSION} - secrets: - - forge_token_name - - forge_token From 20ea94910285842b2683cee3be4f97333118a56a Mon Sep 17 00:00:00 2001 From: "woodpecker[bot]" Date: Sat, 22 Feb 2025 21:09:34 +0000 Subject: [PATCH 10/10] chore(release): 2.0.5 --- package.json | 2 +- system.json | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index bdcd0a62..e58b8862 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "private": true, "name": "dungeonslayers4", "description": "An implementation of the Dungeonslayers 4 game system for Foundry Virtual Tabletop.", - "version": "2.0.4", + "version": "2.0.5", "license": "https://git.f3l.de/dungeonslayers/ds4#licensing", "homepage": "https://git.f3l.de/dungeonslayers/ds4", "repository": { diff --git a/system.json b/system.json index b0c8a6ff..36245e6f 100644 --- a/system.json +++ b/system.json @@ -28,11 +28,11 @@ "name": "Sascha Martens" } ], - "license": "https://git.f3l.de/dungeonslayers/ds4/raw/tag/2.0.4/LICENSE.md", - "readme": "https://git.f3l.de/dungeonslayers/ds4/raw/tag/2.0.4/README.md", + "license": "https://git.f3l.de/dungeonslayers/ds4/raw/tag/2.0.5/LICENSE.md", + "readme": "https://git.f3l.de/dungeonslayers/ds4/raw/tag/2.0.5/README.md", "bugs": "https://git.f3l.de/dungeonslayers/ds4/issues", - "changelog": "https://git.f3l.de/dungeonslayers/ds4/releases/tag/2.0.4", - "version": "2.0.4", + "changelog": "https://git.f3l.de/dungeonslayers/ds4/releases/tag/2.0.5", + "version": "2.0.5", "flags": { "hotReload": { "extensions": ["css", "hbs", "json"], @@ -116,7 +116,7 @@ } ], "manifest": "https://git.f3l.de/api/packages/dungeonslayers/generic/ds4/latest/system.json", - "download": "https://git.f3l.de/dungeonslayers/ds4/releases/download/2.0.4/ds4.zip", + "download": "https://git.f3l.de/dungeonslayers/ds4/releases/download/2.0.5/ds4.zip", "initiative": "@combatValues.initiative.total", "grid": { "distance": 1,