ep_author_neat2 2.0.2 → 2.0.9
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/.eslintrc.cjs +9 -0
- package/.github/dependabot.yml +11 -0
- package/.github/workflows/codeql.yml +16 -0
- package/.github/workflows/test-and-release.yml +7 -0
- package/package.json +9 -22
- package/.github/workflows/backend-tests.yml +0 -61
- package/.github/workflows/frontend-tests.yml +0 -92
- package/.github/workflows/npmpublish.yml +0 -87
package/.eslintrc.cjs
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
name: "CodeQL"
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [ "main" ]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [ "main" ]
|
|
8
|
+
schedule:
|
|
9
|
+
- cron: "48 0 * * 2"
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
analyze:
|
|
14
|
+
uses: ether/ether-pipelines/.github/workflows/codeql-plugins.yml@main
|
|
15
|
+
secrets: inherit
|
|
16
|
+
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ep_author_neat2",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.9",
|
|
4
4
|
"description": "Etherpad plugin that uses colored underlines instead of colored backgrounds to indicate authorship.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
|
-
"url": "https://github.com/ether/
|
|
7
|
+
"url": "https://github.com/ether/ether-plugins.git"
|
|
8
8
|
},
|
|
9
9
|
"keywords": [
|
|
10
10
|
"ep",
|
|
@@ -13,36 +13,23 @@
|
|
|
13
13
|
],
|
|
14
14
|
"license": "MIT",
|
|
15
15
|
"bugs": {
|
|
16
|
-
"url": "https://github.com/ether/
|
|
16
|
+
"url": "https://github.com/ether/ether-plugins/issues"
|
|
17
17
|
},
|
|
18
|
-
"homepage": "https://github.com/ether/ep_author_neat2#readme",
|
|
18
|
+
"homepage": "https://github.com/ether/ether-plugins/tree/main/ep_author_neat2#readme",
|
|
19
19
|
"funding": {
|
|
20
20
|
"type": "individual",
|
|
21
21
|
"url": "https://etherpad.org/"
|
|
22
22
|
},
|
|
23
23
|
"devDependencies": {
|
|
24
|
-
"eslint": "^
|
|
25
|
-
"eslint-config-etherpad": "^
|
|
26
|
-
"
|
|
27
|
-
"eslint-plugin-eslint-comments": "^3.2.0",
|
|
28
|
-
"eslint-plugin-mocha": "^9.0.0",
|
|
29
|
-
"eslint-plugin-node": "^11.1.0",
|
|
30
|
-
"eslint-plugin-prefer-arrow": "^1.2.3",
|
|
31
|
-
"eslint-plugin-promise": "^5.1.1",
|
|
32
|
-
"eslint-plugin-you-dont-need-lodash-underscore": "^6.12.0"
|
|
33
|
-
},
|
|
34
|
-
"peerDependencies": {
|
|
35
|
-
"ep_etherpad-lite": ">=1.8.6"
|
|
24
|
+
"eslint": "^9.24.0",
|
|
25
|
+
"eslint-config-etherpad": "^4.0.4",
|
|
26
|
+
"typescript": "^5.4.3"
|
|
36
27
|
},
|
|
37
28
|
"engines": {
|
|
38
|
-
"node": ">=
|
|
39
|
-
},
|
|
40
|
-
"eslintConfig": {
|
|
41
|
-
"root": true,
|
|
42
|
-
"extends": "etherpad/plugin"
|
|
29
|
+
"node": ">=20.0.0"
|
|
43
30
|
},
|
|
44
31
|
"scripts": {
|
|
45
32
|
"lint": "eslint .",
|
|
46
33
|
"lint:fix": "eslint --fix ."
|
|
47
34
|
}
|
|
48
|
-
}
|
|
35
|
+
}
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
name: "Backend tests"
|
|
2
|
-
|
|
3
|
-
# any branch is useful for testing before a PR is submitted
|
|
4
|
-
on: [push, pull_request]
|
|
5
|
-
|
|
6
|
-
jobs:
|
|
7
|
-
withplugins:
|
|
8
|
-
# run on pushes to any branch
|
|
9
|
-
# run on PRs from external forks
|
|
10
|
-
if: |
|
|
11
|
-
(github.event_name != 'pull_request')
|
|
12
|
-
|| (github.event.pull_request.head.repo.id != github.event.pull_request.base.repo.id)
|
|
13
|
-
name: with Plugins
|
|
14
|
-
runs-on: ubuntu-latest
|
|
15
|
-
|
|
16
|
-
steps:
|
|
17
|
-
- uses: actions/setup-node@v2
|
|
18
|
-
with:
|
|
19
|
-
node-version: 12
|
|
20
|
-
|
|
21
|
-
- name: Install libreoffice
|
|
22
|
-
run: |
|
|
23
|
-
sudo add-apt-repository -y ppa:libreoffice/ppa
|
|
24
|
-
sudo apt update
|
|
25
|
-
sudo apt install -y --no-install-recommends libreoffice libreoffice-pdfimport
|
|
26
|
-
|
|
27
|
-
# clone etherpad-lite
|
|
28
|
-
- name: Install etherpad core
|
|
29
|
-
uses: actions/checkout@v2
|
|
30
|
-
with:
|
|
31
|
-
repository: ether/etherpad-lite
|
|
32
|
-
|
|
33
|
-
- name: Install all dependencies and symlink for ep_etherpad-lite
|
|
34
|
-
run: src/bin/installDeps.sh
|
|
35
|
-
|
|
36
|
-
- name: Checkout plugin repository
|
|
37
|
-
uses: actions/checkout@v2
|
|
38
|
-
with:
|
|
39
|
-
path: ./node_modules/__tmp
|
|
40
|
-
|
|
41
|
-
- name: Determine plugin name
|
|
42
|
-
id: plugin_name
|
|
43
|
-
run: |
|
|
44
|
-
cd ./node_modules/__tmp
|
|
45
|
-
npx -c 'printf %s\\n "::set-output name=plugin_name::${npm_package_name}"'
|
|
46
|
-
|
|
47
|
-
- name: Rename plugin directory
|
|
48
|
-
run: |
|
|
49
|
-
mv ./node_modules/__tmp ./node_modules/"${PLUGIN_NAME}"
|
|
50
|
-
env:
|
|
51
|
-
PLUGIN_NAME: ${{ steps.plugin_name.outputs.plugin_name }}
|
|
52
|
-
|
|
53
|
-
- name: Install plugin dependencies
|
|
54
|
-
run: |
|
|
55
|
-
cd ./node_modules/"${PLUGIN_NAME}"
|
|
56
|
-
npm ci
|
|
57
|
-
env:
|
|
58
|
-
PLUGIN_NAME: ${{ steps.plugin_name.outputs.plugin_name }}
|
|
59
|
-
|
|
60
|
-
- name: Run the backend tests
|
|
61
|
-
run: cd src && npm test
|
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
# Publicly credit Sauce Labs because they generously support open source
|
|
2
|
-
# projects.
|
|
3
|
-
name: "frontend tests powered by Sauce Labs"
|
|
4
|
-
|
|
5
|
-
on: [push]
|
|
6
|
-
|
|
7
|
-
jobs:
|
|
8
|
-
test:
|
|
9
|
-
runs-on: ubuntu-latest
|
|
10
|
-
|
|
11
|
-
steps:
|
|
12
|
-
- name: Generate Sauce Labs strings
|
|
13
|
-
id: sauce_strings
|
|
14
|
-
run: |
|
|
15
|
-
printf %s\\n '::set-output name=name::${{github.event.repository.name}} ${{ github.workflow }} - ${{ github.job }}'
|
|
16
|
-
printf %s\\n '::set-output name=tunnel_id::${{ github.run_id }}-${{ github.run_number }}-${{ github.job }}'
|
|
17
|
-
|
|
18
|
-
- uses: actions/setup-node@v2
|
|
19
|
-
with:
|
|
20
|
-
node-version: 12
|
|
21
|
-
|
|
22
|
-
- name: Check out Etherpad core
|
|
23
|
-
uses: actions/checkout@v2
|
|
24
|
-
with:
|
|
25
|
-
repository: ether/etherpad-lite
|
|
26
|
-
|
|
27
|
-
- name: Check out the plugin
|
|
28
|
-
uses: actions/checkout@v2
|
|
29
|
-
with:
|
|
30
|
-
path: ./node_modules/__tmp
|
|
31
|
-
|
|
32
|
-
- name: export GIT_HASH to env
|
|
33
|
-
id: environment
|
|
34
|
-
run: |
|
|
35
|
-
cd ./node_modules/__tmp
|
|
36
|
-
echo "::set-output name=sha_short::$(git rev-parse --short ${{ github.sha }})"
|
|
37
|
-
|
|
38
|
-
- name: Determine plugin name
|
|
39
|
-
id: plugin_name
|
|
40
|
-
run: |
|
|
41
|
-
cd ./node_modules/__tmp
|
|
42
|
-
npx -c 'printf %s\\n "::set-output name=plugin_name::${npm_package_name}"'
|
|
43
|
-
|
|
44
|
-
- name: Rename plugin directory
|
|
45
|
-
env:
|
|
46
|
-
PLUGIN_NAME: ${{ steps.plugin_name.outputs.plugin_name }}
|
|
47
|
-
run: |
|
|
48
|
-
mv ./node_modules/__tmp ./node_modules/"${PLUGIN_NAME}"
|
|
49
|
-
|
|
50
|
-
- name: Install plugin dependencies
|
|
51
|
-
env:
|
|
52
|
-
PLUGIN_NAME: ${{ steps.plugin_name.outputs.plugin_name }}
|
|
53
|
-
run: |
|
|
54
|
-
cd ./node_modules/"${PLUGIN_NAME}"
|
|
55
|
-
npm ci
|
|
56
|
-
|
|
57
|
-
# This must be run after setting up the plugin, otherwise npm will try to
|
|
58
|
-
# hoist common dependencies by removing them from src/node_modules and
|
|
59
|
-
# installing them in the top-level node_modules. As of v6.14.10, npm's hoist
|
|
60
|
-
# logic appears to be buggy, because it sometimes removes dependencies from
|
|
61
|
-
# src/node_modules but fails to add them to the top-level node_modules. Even
|
|
62
|
-
# if npm correctly hoists the dependencies, the hoisting seems to confuse
|
|
63
|
-
# tools such as `npm outdated`, `npm update`, and some ESLint rules.
|
|
64
|
-
- name: Install Etherpad core dependencies
|
|
65
|
-
run: src/bin/installDeps.sh
|
|
66
|
-
|
|
67
|
-
- name: Create settings.json
|
|
68
|
-
run: cp settings.json.template settings.json
|
|
69
|
-
|
|
70
|
-
- name: Disable import/export rate limiting
|
|
71
|
-
run: |
|
|
72
|
-
sed -e '/^ *"importExportRateLimiting":/,/^ *\}/ s/"max":.*/"max": 0/' -i settings.json
|
|
73
|
-
|
|
74
|
-
- name: Remove standard frontend test files
|
|
75
|
-
run: rm -rf src/tests/frontend/specs
|
|
76
|
-
|
|
77
|
-
- uses: saucelabs/sauce-connect-action@v1
|
|
78
|
-
with:
|
|
79
|
-
username: ${{ secrets.SAUCE_USERNAME }}
|
|
80
|
-
accessKey: ${{ secrets.SAUCE_ACCESS_KEY }}
|
|
81
|
-
tunnelIdentifier: ${{ steps.sauce_strings.outputs.tunnel_id }}
|
|
82
|
-
|
|
83
|
-
- name: Run the frontend tests
|
|
84
|
-
shell: bash
|
|
85
|
-
env:
|
|
86
|
-
SAUCE_USERNAME: ${{ secrets.SAUCE_USERNAME }}
|
|
87
|
-
SAUCE_ACCESS_KEY: ${{ secrets.SAUCE_ACCESS_KEY }}
|
|
88
|
-
SAUCE_NAME: ${{ steps.sauce_strings.outputs.name }}
|
|
89
|
-
TRAVIS_JOB_NUMBER: ${{ steps.sauce_strings.outputs.tunnel_id }}
|
|
90
|
-
GIT_HASH: ${{ steps.environment.outputs.sha_short }}
|
|
91
|
-
run: |
|
|
92
|
-
src/tests/frontend/travis/runner.sh
|
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
# This workflow will run tests using node and then publish a package to the npm registry when a release is created
|
|
2
|
-
# For more information see: https://help.github.com/actions/language-and-framework-guides/publishing-nodejs-packages
|
|
3
|
-
|
|
4
|
-
name: Node.js Package
|
|
5
|
-
|
|
6
|
-
on:
|
|
7
|
-
pull_request:
|
|
8
|
-
push:
|
|
9
|
-
branches:
|
|
10
|
-
- main
|
|
11
|
-
- master
|
|
12
|
-
|
|
13
|
-
jobs:
|
|
14
|
-
test:
|
|
15
|
-
runs-on: ubuntu-latest
|
|
16
|
-
steps:
|
|
17
|
-
# Clone ether/etherpad-lite to ../etherpad-lite so that ep_etherpad-lite
|
|
18
|
-
# can be "installed" in this plugin's node_modules. The checkout v2 action
|
|
19
|
-
# doesn't support cloning outside of $GITHUB_WORKSPACE (see
|
|
20
|
-
# https://github.com/actions/checkout/issues/197), so the repo is first
|
|
21
|
-
# cloned to etherpad-lite then moved to ../etherpad-lite. To avoid
|
|
22
|
-
# conflicts with this plugin's clone, etherpad-lite must be cloned and
|
|
23
|
-
# moved out before this plugin's repo is cloned to $GITHUB_WORKSPACE.
|
|
24
|
-
- uses: actions/checkout@v2
|
|
25
|
-
with:
|
|
26
|
-
repository: ether/etherpad-lite
|
|
27
|
-
path: etherpad-lite
|
|
28
|
-
- run: mv etherpad-lite ..
|
|
29
|
-
# etherpad-lite has been moved outside of $GITHUB_WORKSPACE, so it is now
|
|
30
|
-
# safe to clone this plugin's repo to $GITHUB_WORKSPACE.
|
|
31
|
-
- uses: actions/checkout@v2
|
|
32
|
-
- uses: actions/setup-node@v1
|
|
33
|
-
with:
|
|
34
|
-
node-version: 12
|
|
35
|
-
# All of ep_etherpad-lite's devDependencies are installed because the
|
|
36
|
-
# plugin might do `require('ep_etherpad-lite/node_modules/${devDep}')`.
|
|
37
|
-
# Eventually it would be nice to create an ESLint plugin that prohibits
|
|
38
|
-
# Etherpad plugins from piggybacking off of ep_etherpad-lite's
|
|
39
|
-
# devDependencies. If we had that, we could change this line to only
|
|
40
|
-
# install production dependencies.
|
|
41
|
-
- run: cd ../etherpad-lite/src && npm ci
|
|
42
|
-
- run: npm ci
|
|
43
|
-
# This runs some sanity checks and creates a symlink at
|
|
44
|
-
# node_modules/ep_etherpad-lite that points to ../../etherpad-lite/src.
|
|
45
|
-
# This step must be done after `npm ci` installs the plugin's dependencies
|
|
46
|
-
# because npm "helpfully" cleans up such symlinks. :( Installing
|
|
47
|
-
# ep_etherpad-lite in the plugin's node_modules prevents lint errors and
|
|
48
|
-
# unit test failures if the plugin does `require('ep_etherpad-lite/foo')`.
|
|
49
|
-
- run: npm install --no-save ep_etherpad-lite@file:../etherpad-lite/src
|
|
50
|
-
- run: npm test
|
|
51
|
-
- run: npm run lint
|
|
52
|
-
|
|
53
|
-
publish-npm:
|
|
54
|
-
if: github.event_name == 'push'
|
|
55
|
-
needs: test
|
|
56
|
-
runs-on: ubuntu-latest
|
|
57
|
-
steps:
|
|
58
|
-
- uses: actions/checkout@v2
|
|
59
|
-
with:
|
|
60
|
-
fetch-depth: 0
|
|
61
|
-
- uses: actions/setup-node@v1
|
|
62
|
-
with:
|
|
63
|
-
node-version: 12
|
|
64
|
-
registry-url: https://registry.npmjs.org/
|
|
65
|
-
- name: Bump version (patch)
|
|
66
|
-
run: |
|
|
67
|
-
LATEST_TAG=$(git describe --tags --abbrev=0) || exit 1
|
|
68
|
-
NEW_COMMITS=$(git rev-list --count "${LATEST_TAG}"..) || exit 1
|
|
69
|
-
[ "${NEW_COMMITS}" -gt 0 ] || exit 0
|
|
70
|
-
git config user.name 'github-actions[bot]'
|
|
71
|
-
git config user.email '41898282+github-actions[bot]@users.noreply.github.com'
|
|
72
|
-
npm ci
|
|
73
|
-
npm version patch
|
|
74
|
-
git push --follow-tags
|
|
75
|
-
# `npm publish` must come after `git push` otherwise there is a race
|
|
76
|
-
# condition: If two PRs are merged back-to-back then master/main will be
|
|
77
|
-
# updated with the commits from the second PR before the first PR's
|
|
78
|
-
# workflow has a chance to push the commit generated by `npm version
|
|
79
|
-
# patch`. This causes the first PR's `git push` step to fail after the
|
|
80
|
-
# package has already been published, which in turn will cause all future
|
|
81
|
-
# workflow runs to fail because they will all attempt to use the same
|
|
82
|
-
# already-used version number. By running `npm publish` after `git push`,
|
|
83
|
-
# back-to-back merges will cause the first merge's workflow to fail but
|
|
84
|
-
# the second's will succeed.
|
|
85
|
-
- run: npm publish
|
|
86
|
-
env:
|
|
87
|
-
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
|