ep_offline_edit 0.0.63 → 0.0.65

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@v3
29
+ - uses: pnpm/action-setup@v6
30
30
  name: Install pnpm
31
31
  with:
32
32
  version: 10
@@ -15,7 +15,8 @@ jobs:
15
15
  uses: actions/checkout@v6
16
16
  with:
17
17
  repository: ether/etherpad-lite
18
- - uses: pnpm/action-setup@v3
18
+ path: etherpad-lite
19
+ - uses: pnpm/action-setup@v6
19
20
  name: Install pnpm
20
21
  with:
21
22
  version: 10
@@ -32,63 +33,36 @@ jobs:
32
33
  restore-keys: |
33
34
  ${{ runner.os }}-pnpm-store-
34
35
  -
35
- name: Check out the plugin
36
+ name: Checkout plugin repository
36
37
  uses: actions/checkout@v6
37
38
  with:
38
- path: ./node_modules/__tmp
39
- -
40
- name: export GIT_HASH to env
41
- id: environment
42
- run: |
43
- cd ./node_modules/__tmp
44
- echo "::set-output name=sha_short::$(git rev-parse --short ${{ github.sha }})"
45
- -
46
- name: Determine plugin name
47
- id: plugin_name
48
- run: |
49
- cd ./node_modules/__tmp
50
- npx -c 'printf %s\\n "::set-output name=plugin_name::${npm_package_name}"'
51
- -
52
- name: Rename plugin directory
53
- env:
54
- PLUGIN_NAME: ${{ steps.plugin_name.outputs.plugin_name }}
55
- run: |
56
- mv ./node_modules/__tmp ./node_modules/"${PLUGIN_NAME}"
57
- -
58
- name: Install plugin dependencies
59
- env:
60
- PLUGIN_NAME: ${{ steps.plugin_name.outputs.plugin_name }}
61
- run: |
62
- cd ./node_modules/"${PLUGIN_NAME}"
63
- pnpm i
64
- # Etherpad core dependencies must be installed after installing the
65
- # plugin's dependencies, otherwise npm will try to hoist common
66
- # dependencies by removing them from src/node_modules and installing them
67
- # in the top-level node_modules. As of v6.14.10, npm's hoist logic appears
68
- # to be buggy, because it sometimes removes dependencies from
69
- # src/node_modules but fails to add them to the top-level node_modules.
70
- # Even if npm correctly hoists the dependencies, the hoisting seems to
71
- # confuse tools such as `npm outdated`, `npm update`, and some ESLint
72
- # rules.
39
+ path: plugin
73
40
  -
74
41
  name: Install Etherpad core dependencies
42
+ working-directory: ./etherpad-lite
75
43
  run: bin/installDeps.sh
44
+ - name: Install plugin
45
+ working-directory: ./etherpad-lite
46
+ run: |
47
+ pnpm run plugins i --path ../../plugin
76
48
  - name: Create settings.json
49
+ working-directory: ./etherpad-lite
77
50
  run: cp ./src/tests/settings.json settings.json
78
51
  - name: Run the frontend tests
52
+ working-directory: ./etherpad-lite
79
53
  shell: bash
80
54
  run: |
81
55
  pnpm run dev &
82
56
  connected=false
83
57
  can_connect() {
84
- curl -sSfo /dev/null http://localhost:9001/ || return 1
85
- connected=true
58
+ curl -sSfo /dev/null http://localhost:9001/ || return 1
59
+ connected=true
86
60
  }
87
61
  now() { date +%s; }
88
62
  start=$(now)
89
- while [ $(($(now) - $start)) -le 15 ] && ! can_connect; do
90
- sleep 1
63
+ while [ $(($(now) - $start)) -le 30 ] && ! can_connect; do
64
+ sleep 1
91
65
  done
92
66
  cd src
93
- pnpm exec playwright install chromium --with-deps
67
+ pnpm exec playwright install chromium --with-deps
94
68
  pnpm run test-ui --project=chromium
@@ -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@v5
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
- pnpm version patch
67
- NEW_TAG="v$(node -p "require('./package.json').version")"
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
@@ -13,3 +13,20 @@ Also should speed up pad load times.
13
13
 
14
14
  # License
15
15
  Apache 2
16
+
17
+ ## Installation
18
+
19
+ Install from the Etherpad admin UI (**Admin → Manage Plugins**,
20
+ search for `ep_offline_edit` and click *Install*), or from the Etherpad
21
+ root directory:
22
+
23
+ ```sh
24
+ pnpm run plugins install ep_offline_edit
25
+ ```
26
+
27
+ > ⚠️ Don't run `npm i` / `npm install` yourself from the Etherpad
28
+ > source tree — Etherpad tracks installed plugins through its own
29
+ > plugin-manager, and hand-editing `package.json` can leave the
30
+ > server unable to start.
31
+
32
+ After installing, restart Etherpad.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ep_offline_edit",
3
- "version": "0.0.63",
3
+ "version": "0.0.65",
4
4
  "description": "View your pad data even if you are disconnected from the Internets",
5
5
  "author": {
6
6
  "name": "John McLear",
@@ -21,8 +21,8 @@
21
21
  },
22
22
  "devDependencies": {
23
23
  "eslint": "^8.57.1",
24
- "eslint-config-etherpad": "^4.0.4",
25
- "typescript": "^6.0.2"
24
+ "eslint-config-etherpad": "^4.0.5",
25
+ "typescript": "^6.0.3"
26
26
  },
27
27
  "scripts": {
28
28
  "lint": "eslint .",