@cocreate/plugins 1.5.0 → 1.7.0
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/.github/workflows/automated.yml +22 -20
- package/package.json +4 -4
- package/src/index.js +3 -3
|
@@ -9,33 +9,36 @@ jobs:
|
|
|
9
9
|
about:
|
|
10
10
|
runs-on: ubuntu-latest
|
|
11
11
|
steps:
|
|
12
|
-
- name: Checkout
|
|
13
|
-
uses: actions/checkout@
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
12
|
+
- name: Checkout repository
|
|
13
|
+
uses: actions/checkout@v7
|
|
14
|
+
|
|
15
|
+
- name: Sync package.json description to GitHub About
|
|
16
|
+
env:
|
|
17
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB }}
|
|
18
|
+
run: |
|
|
19
|
+
DESC=$(jq -r '.description // empty' package.json)
|
|
20
|
+
if [ -n "$DESC" ]; then
|
|
21
|
+
echo "Updating repository description to: $DESC"
|
|
22
|
+
gh api -X PATCH repos/${{ github.repository }} -f description="$DESC"
|
|
23
|
+
else
|
|
24
|
+
echo "No description found in package.json."
|
|
25
|
+
fi
|
|
23
26
|
|
|
24
27
|
release:
|
|
25
28
|
runs-on: ubuntu-latest
|
|
26
29
|
steps:
|
|
27
|
-
- name: Checkout
|
|
28
|
-
uses: actions/checkout@
|
|
30
|
+
- name: Checkout repository
|
|
31
|
+
uses: actions/checkout@v7
|
|
29
32
|
with:
|
|
30
|
-
fetch-depth: 0
|
|
33
|
+
fetch-depth: 0
|
|
34
|
+
token: ${{ secrets.GITHUB }} # Authenticates git CLI for tag/commit pushes
|
|
31
35
|
|
|
32
36
|
- name: Setup Node.js
|
|
33
|
-
uses: actions/setup-node@
|
|
37
|
+
uses: actions/setup-node@v7
|
|
34
38
|
with:
|
|
35
|
-
node-version:
|
|
39
|
+
node-version: '24'
|
|
36
40
|
|
|
37
41
|
- name: Install Semantic Release & Plugins
|
|
38
|
-
# Installs semantic-release and its plugins on the runner
|
|
39
42
|
run: |
|
|
40
43
|
npm install -g semantic-release \
|
|
41
44
|
@semantic-release/changelog \
|
|
@@ -43,12 +46,11 @@ jobs:
|
|
|
43
46
|
@semantic-release/github \
|
|
44
47
|
@semantic-release/git
|
|
45
48
|
|
|
46
|
-
- name: Run Semantic Release
|
|
49
|
+
- name: Run Semantic Release
|
|
47
50
|
id: semantic
|
|
48
|
-
# This will automatically pick up your export default config file in the repository root
|
|
49
51
|
run: npx semantic-release
|
|
50
52
|
env:
|
|
51
|
-
GITHUB_TOKEN: "${{ secrets.
|
|
53
|
+
GITHUB_TOKEN: "${{ secrets.GITHUB }}"
|
|
52
54
|
NPM_TOKEN: "${{ secrets.NPM_TOKEN }}"
|
|
53
55
|
|
|
54
56
|
outputs:
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cocreate/plugins",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.7.0",
|
|
4
4
|
"description": "CoCreate plugins",
|
|
5
5
|
"author": "CoCreate LLC",
|
|
6
6
|
"license": "AGPL-3.0",
|
|
@@ -27,14 +27,14 @@
|
|
|
27
27
|
"type": "module",
|
|
28
28
|
"main": "./src/index.js",
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@cocreate/observer": "^1.
|
|
30
|
+
"@cocreate/observer": "^1.21.0"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
|
-
"@cocreate/webpack": "^1.
|
|
33
|
+
"@cocreate/webpack": "^1.7.0"
|
|
34
34
|
},
|
|
35
35
|
"allowScripts": {
|
|
36
36
|
"@cocreate/observer@1.19.0": true,
|
|
37
37
|
"@cocreate/utils@1.42.2": true,
|
|
38
38
|
"@cocreate/webpack@1.4.3": true
|
|
39
39
|
}
|
|
40
|
-
}
|
|
40
|
+
}
|
package/src/index.js
CHANGED
|
@@ -196,7 +196,7 @@ async function processPlugin(el) {
|
|
|
196
196
|
const targetPlugins = new Set();
|
|
197
197
|
configs.forEach(conf => {
|
|
198
198
|
Object.keys(conf).forEach(k => {
|
|
199
|
-
if (!k.startsWith('
|
|
199
|
+
if (!k.startsWith('\u0024')) {
|
|
200
200
|
targetPlugins.add(k.split('.')[0]);
|
|
201
201
|
}
|
|
202
202
|
});
|
|
@@ -215,7 +215,7 @@ async function processPlugin(el) {
|
|
|
215
215
|
}
|
|
216
216
|
|
|
217
217
|
// Format operator key with $ for AST engine recognition (e.g. SimpleBar -> $SimpleBar)
|
|
218
|
-
const operatorName = pluginName.startsWith('
|
|
218
|
+
const operatorName = pluginName.startsWith('\u0024') ? pluginName : `$${pluginName}`;
|
|
219
219
|
|
|
220
220
|
// Create constructor wrapper to safely instantiate class/function
|
|
221
221
|
const opWrapper = function(params) {
|
|
@@ -242,7 +242,7 @@ async function processPlugin(el) {
|
|
|
242
242
|
executeAST: { [operatorName]: astValue }
|
|
243
243
|
});
|
|
244
244
|
|
|
245
|
-
if (result !== undefined && !pluginName.startsWith('
|
|
245
|
+
if (result !== undefined && !pluginName.startsWith('\u0024')) {
|
|
246
246
|
// Attach returned plugin instance directly onto element property
|
|
247
247
|
el[pluginName] = result;
|
|
248
248
|
}
|