@plutocms/utils 0.0.1-alpha.7 → 0.1.1
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/CHANGELOG.md +15 -0
- package/app/composables/sidebar-admin-actions.ts +1 -2
- package/package.json +4 -1
- package/.editorconfig +0 -12
- package/.github/dependabot.yml +0 -11
- package/.github/workflows/publish.yml +0 -59
- package/.github/workflows/release.yml +0 -110
- package/.prettierrc +0 -9
- package/.vscode/extensions.json +0 -14
- package/.vscode/settings.json +0 -47
- package/.vscode/vue.code-snippets +0 -16
- package/bun.lock +0 -2809
- package/eslint.config.mjs +0 -85
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## [0.1.1](https://github.com/plutocms/utils/compare/v0.1.0...v0.1.1) (2026-09-03)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* release the ref->shallowRef useSidebarAdminActions fix ([cac2b50](https://github.com/plutocms/utils/commit/cac2b509e95abae386c48a121e8fc434d328634d))
|
|
9
|
+
|
|
10
|
+
## [0.1.0](https://github.com/plutocms/utils/compare/v0.0.1-alpha.7...v0.1.0) (2026-07-08)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Miscellaneous Chores
|
|
14
|
+
|
|
15
|
+
* **ci:** migrate to release-please for automated releases ([272688f](https://github.com/plutocms/utils/commit/272688fb582ac66189fffbe7bd0df5828beeafc1))
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import type { NavigationMenuItem } from '@nuxt/ui'
|
|
2
2
|
|
|
3
|
-
const actions =
|
|
3
|
+
const actions = shallowRef<NavigationMenuItem[]>([])
|
|
4
4
|
|
|
5
5
|
export function useSidebarAdminActions() {
|
|
6
6
|
const addAction = (action: NavigationMenuItem[]) => {
|
|
7
|
-
// @ts-expect-error - Type instantiation is excessively deep and possibly infinite.
|
|
8
7
|
const existingLabels = new Set(actions.value.map((a) => a.label))
|
|
9
8
|
const newActions = action.filter((a) => !existingLabels.has(a.label))
|
|
10
9
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@plutocms/utils",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.1.1",
|
|
5
5
|
"description": "",
|
|
6
6
|
"author": "Victor Ribeiro",
|
|
7
7
|
"license": "MIT",
|
|
@@ -43,5 +43,8 @@
|
|
|
43
43
|
"vue": "^3.5.28",
|
|
44
44
|
"vue-router": "^5.0.2",
|
|
45
45
|
"vue-tsc": "^3.3.7"
|
|
46
|
+
},
|
|
47
|
+
"publishConfig": {
|
|
48
|
+
"access": "public"
|
|
46
49
|
}
|
|
47
50
|
}
|
package/.editorconfig
DELETED
package/.github/dependabot.yml
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
# To get started with Dependabot version updates, you'll need to specify which
|
|
2
|
-
# package ecosystems to update and where the package manifests are located.
|
|
3
|
-
# Please see the documentation for all configuration options:
|
|
4
|
-
# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
|
|
5
|
-
|
|
6
|
-
version: 2
|
|
7
|
-
updates:
|
|
8
|
-
- package-ecosystem: bun # See documentation for possible values
|
|
9
|
-
directory: / # Location of package manifests
|
|
10
|
-
schedule:
|
|
11
|
-
interval: weekly
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
name: Publish
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
pull_request:
|
|
5
|
-
types: [closed]
|
|
6
|
-
branches: [main]
|
|
7
|
-
|
|
8
|
-
jobs:
|
|
9
|
-
publish:
|
|
10
|
-
name: Publish to npm
|
|
11
|
-
# Only run when a release PR (title = vX.X.X) is merged
|
|
12
|
-
if: github.event.pull_request.merged == true && startsWith(github.event.pull_request.title, 'v')
|
|
13
|
-
runs-on: ubuntu-latest
|
|
14
|
-
permissions:
|
|
15
|
-
contents: write # push tags & create GitHub releases
|
|
16
|
-
id-token: write # npm provenance attestation
|
|
17
|
-
|
|
18
|
-
steps:
|
|
19
|
-
- name: Checkout
|
|
20
|
-
uses: actions/checkout@v4
|
|
21
|
-
|
|
22
|
-
- name: Setup Bun
|
|
23
|
-
uses: oven-sh/setup-bun@v1
|
|
24
|
-
with:
|
|
25
|
-
bun-version: latest
|
|
26
|
-
|
|
27
|
-
- name: Setup Node.js
|
|
28
|
-
uses: actions/setup-node@v4
|
|
29
|
-
with:
|
|
30
|
-
node-version: 24
|
|
31
|
-
registry-url: https://registry.npmjs.org/
|
|
32
|
-
|
|
33
|
-
- name: Configure git
|
|
34
|
-
run: |
|
|
35
|
-
git config user.name "github-actions[bot]"
|
|
36
|
-
git config user.email "github-actions[bot]@users.noreply.github.com"
|
|
37
|
-
|
|
38
|
-
- name: Install dependencies
|
|
39
|
-
run: bun install --frozen-lockfile
|
|
40
|
-
|
|
41
|
-
- name: Publish to npm
|
|
42
|
-
run: |
|
|
43
|
-
VERSION=$(node -p "require('./package.json').version")
|
|
44
|
-
if [[ "$VERSION" == *-* ]]; then
|
|
45
|
-
TAG=$(echo "$VERSION" | sed -E 's/^[0-9]+\.[0-9]+\.[0-9]+-([a-zA-Z]+).*/\1/')
|
|
46
|
-
else
|
|
47
|
-
TAG=latest
|
|
48
|
-
fi
|
|
49
|
-
npm publish --provenance --access public --tag "$TAG"
|
|
50
|
-
|
|
51
|
-
# Only tag and create the GitHub release after a successful publish
|
|
52
|
-
- name: Create git tag and GitHub release
|
|
53
|
-
run: |
|
|
54
|
-
VERSION=$(node -p "require('./package.json').version")
|
|
55
|
-
git tag "v$VERSION"
|
|
56
|
-
git push origin "v$VERSION"
|
|
57
|
-
gh release create "v$VERSION" --generate-notes --title "v$VERSION"
|
|
58
|
-
env:
|
|
59
|
-
GH_TOKEN: ${{ github.token }}
|
|
@@ -1,110 +0,0 @@
|
|
|
1
|
-
name: Release
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
workflow_dispatch:
|
|
5
|
-
inputs:
|
|
6
|
-
bump:
|
|
7
|
-
description: Version bump type (auto-detected from conventional commits if not set)
|
|
8
|
-
required: false
|
|
9
|
-
default: ''
|
|
10
|
-
type: choice
|
|
11
|
-
options:
|
|
12
|
-
- ''
|
|
13
|
-
- patch
|
|
14
|
-
- minor
|
|
15
|
-
- major
|
|
16
|
-
|
|
17
|
-
# Prevent concurrent releases
|
|
18
|
-
concurrency:
|
|
19
|
-
group: release
|
|
20
|
-
cancel-in-progress: false
|
|
21
|
-
|
|
22
|
-
jobs:
|
|
23
|
-
release:
|
|
24
|
-
name: Create Release PR
|
|
25
|
-
runs-on: ubuntu-latest
|
|
26
|
-
permissions:
|
|
27
|
-
contents: write
|
|
28
|
-
pull-requests: write
|
|
29
|
-
|
|
30
|
-
steps:
|
|
31
|
-
- name: Checkout
|
|
32
|
-
uses: actions/checkout@v4
|
|
33
|
-
with:
|
|
34
|
-
fetch-depth: 0 # full history required by changelogen to read all commits
|
|
35
|
-
|
|
36
|
-
- name: Setup Bun
|
|
37
|
-
uses: oven-sh/setup-bun@v1
|
|
38
|
-
with:
|
|
39
|
-
bun-version: latest
|
|
40
|
-
|
|
41
|
-
- name: Setup Node.js
|
|
42
|
-
uses: actions/setup-node@v4
|
|
43
|
-
with:
|
|
44
|
-
node-version: 24
|
|
45
|
-
|
|
46
|
-
- name: Configure git
|
|
47
|
-
run: |
|
|
48
|
-
git config user.name "github-actions[bot]"
|
|
49
|
-
git config user.email "github-actions[bot]@users.noreply.github.com"
|
|
50
|
-
|
|
51
|
-
- name: Install dependencies
|
|
52
|
-
run: bun install --frozen-lockfile
|
|
53
|
-
|
|
54
|
-
- name: Lint
|
|
55
|
-
run: bun run lint || true
|
|
56
|
-
|
|
57
|
-
- name: Test
|
|
58
|
-
run: bun test || true
|
|
59
|
-
|
|
60
|
-
# Create a release branch before changelogen, run changelogen and commit on the branch, push, then open PR
|
|
61
|
-
- name: Create release branch
|
|
62
|
-
run: |
|
|
63
|
-
VERSION_BEFORE=$(node -p "require('./package.json').version")
|
|
64
|
-
BRANCH="release/v$VERSION_BEFORE"
|
|
65
|
-
git checkout -b "$BRANCH"
|
|
66
|
-
|
|
67
|
-
# Run changelogen and only commit if there are changes
|
|
68
|
-
- name: Bump version and generate changelog (on release branch)
|
|
69
|
-
id: changelogen
|
|
70
|
-
run: |
|
|
71
|
-
BUMP="${{ inputs.bump }}"
|
|
72
|
-
if [ -n "$BUMP" ]; then
|
|
73
|
-
npx changelogen@latest --$BUMP
|
|
74
|
-
else
|
|
75
|
-
npx changelogen@latest --bump
|
|
76
|
-
fi
|
|
77
|
-
git add package.json CHANGELOG.md || true
|
|
78
|
-
VERSION=$(node -p "require('./package.json').version")
|
|
79
|
-
# Only commit if there are changes
|
|
80
|
-
if ! git diff --cached --quiet; then
|
|
81
|
-
git commit -m "chore(release): v$VERSION"
|
|
82
|
-
echo "has_changes=true" >> $GITHUB_ENV
|
|
83
|
-
else
|
|
84
|
-
echo "No changes to commit. Skipping PR creation."
|
|
85
|
-
echo "has_changes=false" >> $GITHUB_ENV
|
|
86
|
-
fi
|
|
87
|
-
env:
|
|
88
|
-
GH_TOKEN: ${{ github.token }}
|
|
89
|
-
|
|
90
|
-
- name: Push release branch
|
|
91
|
-
if: env.has_changes == 'true'
|
|
92
|
-
run: |
|
|
93
|
-
VERSION=$(node -p "require('./package.json').version")
|
|
94
|
-
BRANCH="release/v$VERSION"
|
|
95
|
-
git push origin "$BRANCH"
|
|
96
|
-
env:
|
|
97
|
-
GH_TOKEN: ${{ github.token }}
|
|
98
|
-
|
|
99
|
-
- name: Create release PR
|
|
100
|
-
if: env.has_changes == 'true'
|
|
101
|
-
run: |
|
|
102
|
-
VERSION=$(node -p "require('./package.json').version")
|
|
103
|
-
BRANCH="release/v$VERSION"
|
|
104
|
-
gh pr create \
|
|
105
|
-
--title "v$VERSION" \
|
|
106
|
-
--body "Release v$VERSION" \
|
|
107
|
-
--base main \
|
|
108
|
-
--head "$BRANCH"
|
|
109
|
-
env:
|
|
110
|
-
GH_TOKEN: ${{ github.token }}
|
package/.prettierrc
DELETED
package/.vscode/extensions.json
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"recommendations": [
|
|
3
|
-
"Vue.volar",
|
|
4
|
-
"EditorConfig.EditorConfig",
|
|
5
|
-
"esbenp.prettier-vscode",
|
|
6
|
-
"dbaeumer.vscode-eslint",
|
|
7
|
-
"bradlc.vscode-tailwindcss",
|
|
8
|
-
"antfu.goto-alias",
|
|
9
|
-
"antfu.iconify",
|
|
10
|
-
"streetsidesoftware.code-spell-checker",
|
|
11
|
-
"usernamehw.errorlens"
|
|
12
|
-
],
|
|
13
|
-
"unwantedRecommendations": ["octref.vetur"]
|
|
14
|
-
}
|
package/.vscode/settings.json
DELETED
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"css.lint.unknownAtRules": "ignore",
|
|
3
|
-
"less.lint.unknownAtRules": "ignore",
|
|
4
|
-
"scss.lint.unknownAtRules": "ignore",
|
|
5
|
-
"files.associations": {
|
|
6
|
-
"*.css": "tailwindcss"
|
|
7
|
-
},
|
|
8
|
-
|
|
9
|
-
"editor.codeActionsOnSave": {
|
|
10
|
-
"source.fixAll": "never",
|
|
11
|
-
"source.fixAll.eslint": "explicit"
|
|
12
|
-
},
|
|
13
|
-
"editor.defaultFormatter": "esbenp.prettier-vscode",
|
|
14
|
-
"editor.formatOnSave": true,
|
|
15
|
-
"editor.gotoLocation.multipleDefinitions": "goto",
|
|
16
|
-
"editor.quickSuggestions": {
|
|
17
|
-
"strings": true
|
|
18
|
-
},
|
|
19
|
-
|
|
20
|
-
"eslint.useFlatConfig": true,
|
|
21
|
-
"eslint.validate": [
|
|
22
|
-
"javascript",
|
|
23
|
-
"javascriptreact",
|
|
24
|
-
"typescript",
|
|
25
|
-
"typescriptreact",
|
|
26
|
-
"vue",
|
|
27
|
-
"html",
|
|
28
|
-
"markdown",
|
|
29
|
-
"json",
|
|
30
|
-
"jsonc",
|
|
31
|
-
"yaml",
|
|
32
|
-
"toml",
|
|
33
|
-
"xml",
|
|
34
|
-
"gql",
|
|
35
|
-
"graphql",
|
|
36
|
-
"astro",
|
|
37
|
-
"svelte",
|
|
38
|
-
"css",
|
|
39
|
-
"less",
|
|
40
|
-
"scss",
|
|
41
|
-
"pcss",
|
|
42
|
-
"postcss",
|
|
43
|
-
"mjs"
|
|
44
|
-
],
|
|
45
|
-
|
|
46
|
-
"vue.inlayHints.missingProps": true
|
|
47
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"Vue Component": {
|
|
3
|
-
"prefix": ["vue", "tem", "template", "setup"],
|
|
4
|
-
"body": [
|
|
5
|
-
"<script setup lang=\"ts\">",
|
|
6
|
-
"$1",
|
|
7
|
-
"</script>",
|
|
8
|
-
"",
|
|
9
|
-
"<template>",
|
|
10
|
-
" <div>$2</div>",
|
|
11
|
-
"</template>",
|
|
12
|
-
"",
|
|
13
|
-
],
|
|
14
|
-
"description": "Vue Component (Script first)",
|
|
15
|
-
},
|
|
16
|
-
}
|