ep_special_characters 0.0.51 → 0.0.53
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.
|
@@ -26,7 +26,7 @@ jobs:
|
|
|
26
26
|
with:
|
|
27
27
|
repository: ether/etherpad-lite
|
|
28
28
|
path: etherpad-lite
|
|
29
|
-
- uses: pnpm/action-setup@
|
|
29
|
+
- uses: pnpm/action-setup@v6
|
|
30
30
|
name: Install pnpm
|
|
31
31
|
with:
|
|
32
32
|
version: 10
|
|
@@ -35,7 +35,7 @@ jobs:
|
|
|
35
35
|
shell: bash
|
|
36
36
|
run: |
|
|
37
37
|
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
|
|
38
|
-
- uses: actions/cache@
|
|
38
|
+
- uses: actions/cache@v5
|
|
39
39
|
name: Setup pnpm cache
|
|
40
40
|
with:
|
|
41
41
|
path: ${{ env.STORE_PATH }}
|
|
@@ -15,7 +15,7 @@ jobs:
|
|
|
15
15
|
uses: actions/checkout@v6
|
|
16
16
|
with:
|
|
17
17
|
repository: ether/etherpad-lite
|
|
18
|
-
- uses: pnpm/action-setup@
|
|
18
|
+
- uses: pnpm/action-setup@v6
|
|
19
19
|
name: Install pnpm
|
|
20
20
|
with:
|
|
21
21
|
version: 10
|
|
@@ -24,7 +24,7 @@ jobs:
|
|
|
24
24
|
shell: bash
|
|
25
25
|
run: |
|
|
26
26
|
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
|
|
27
|
-
- uses: actions/cache@
|
|
27
|
+
- uses: actions/cache@v5
|
|
28
28
|
name: Setup pnpm cache
|
|
29
29
|
with:
|
|
30
30
|
path: ${{ env.STORE_PATH }}
|
|
@@ -31,7 +31,7 @@ jobs:
|
|
|
31
31
|
uses: actions/checkout@v6
|
|
32
32
|
with:
|
|
33
33
|
repository: ether/etherpad-lite
|
|
34
|
-
- uses: pnpm/action-setup@
|
|
34
|
+
- uses: pnpm/action-setup@v6
|
|
35
35
|
name: Install pnpm
|
|
36
36
|
with:
|
|
37
37
|
version: 10
|
|
@@ -59,12 +59,20 @@ jobs:
|
|
|
59
59
|
[ "${NEW_COMMITS}" -gt 0 ] || exit 0
|
|
60
60
|
git config user.name 'github-actions[bot]'
|
|
61
61
|
git config user.email '41898282+github-actions[bot]@users.noreply.github.com'
|
|
62
|
-
pnpm i
|
|
62
|
+
pnpm i --frozen-lockfile
|
|
63
63
|
# `pnpm version patch` bumps package.json, makes a commit, and creates
|
|
64
64
|
# a `v<new-version>` tag. Capture the new tag name from package.json
|
|
65
65
|
# rather than parsing pnpm's output, which has historically varied.
|
|
66
|
-
|
|
67
|
-
|
|
66
|
+
# Bump the patch component directly with Node. pnpm/action-setup@v6
|
|
67
|
+
# sometimes installs pnpm 11 pre-releases even when version: 10.x is
|
|
68
|
+
# requested (pnpm/action-setup#225); those pre-releases either skip
|
|
69
|
+
# the git commit/tag or reject --no-git-tag-version as unknown.
|
|
70
|
+
# Doing the bump in Node sidesteps both failure modes.
|
|
71
|
+
NEW_VERSION=$(node -e "const fs=require('fs');const p=require('./package.json');const v=p.version.split('.');v[2]=String(Number(v[2])+1);p.version=v.join('.');fs.writeFileSync('./package.json',JSON.stringify(p,null,2)+'\n');console.log(p.version);")
|
|
72
|
+
NEW_TAG="v${NEW_VERSION}"
|
|
73
|
+
git add package.json
|
|
74
|
+
git commit -m "${NEW_TAG}"
|
|
75
|
+
git tag -a "${NEW_TAG}" -m "${NEW_TAG}"
|
|
68
76
|
# CRITICAL: use --atomic so the branch update and the tag update
|
|
69
77
|
# succeed (or fail) as a single transaction on the server. The old
|
|
70
78
|
# `git push --follow-tags` was non-atomic per ref: if a concurrent
|
package/README.md
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
|
-
|
|
1
|
+
[](https://github.com/ether/ep_special_characters/actions/workflows/test-and-release.yml)
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
> ⚠️ **Known issue:** Clicking a character in the picker currently throws
|
|
4
|
+
> `ReferenceError: require is not defined` because [`static/js/main.js:16`](static/js/main.js)
|
|
5
|
+
> uses a browser-side `require()` that Etherpad's current esbuild bundler
|
|
6
|
+
> doesn't expose. Tracking fix in [#87](https://github.com/ether/ep_special_characters/issues/87).
|
|
4
7
|
|
|
8
|
+
# Special Character Picker for Etherpad
|
|
5
9
|
TODO: Describe the plugin.
|
|
6
10
|
|
|
7
11
|
## Installation
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ep_special_characters",
|
|
3
3
|
"description": "Insert special characters into a pad",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.53",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Johnyma22",
|
|
7
7
|
"email": "john@mclear.co.uk",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
},
|
|
21
21
|
"devDependencies": {
|
|
22
22
|
"eslint": "^8.57.1",
|
|
23
|
-
"eslint-config-etherpad": "^4.0.
|
|
23
|
+
"eslint-config-etherpad": "^4.0.5",
|
|
24
24
|
"typescript": "^6.0.2"
|
|
25
25
|
},
|
|
26
26
|
"scripts": {
|
package/static/js/hooks.js
CHANGED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const assert = require('assert').strict;
|
|
4
|
+
const hooks = require('../../../../static/js/hooks');
|
|
5
|
+
|
|
6
|
+
describe(__filename, function () {
|
|
7
|
+
describe('aceAttribsToClasses', function () {
|
|
8
|
+
it('invokes cb with the class when key matches and value is set', function (done) {
|
|
9
|
+
hooks.aceAttribsToClasses('aceAttribsToClasses', {key: 'specialCharacters', value: 'Ω'},
|
|
10
|
+
(classes) => {
|
|
11
|
+
assert.deepEqual(classes, ['specialCharacters:Ω']);
|
|
12
|
+
done();
|
|
13
|
+
});
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
it('invokes cb with an empty array when key does not match (regression for #4)', function (done) {
|
|
17
|
+
hooks.aceAttribsToClasses('aceAttribsToClasses', {key: 'bold', value: 'true'},
|
|
18
|
+
(classes) => {
|
|
19
|
+
assert.deepEqual(classes, []);
|
|
20
|
+
done();
|
|
21
|
+
});
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
it('invokes cb with an empty array when value is empty (regression for #4)', function (done) {
|
|
25
|
+
hooks.aceAttribsToClasses('aceAttribsToClasses', {key: 'specialCharacters', value: ''},
|
|
26
|
+
(classes) => {
|
|
27
|
+
assert.deepEqual(classes, []);
|
|
28
|
+
done();
|
|
29
|
+
});
|
|
30
|
+
});
|
|
31
|
+
});
|
|
32
|
+
});
|