ep_author_neat2 2.0.1 → 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 ADDED
@@ -0,0 +1,9 @@
1
+ 'use strict';
2
+
3
+ // This is a workaround for https://github.com/eslint/eslint/issues/3458
4
+ require('eslint-config-etherpad/patch/modern-module-resolution');
5
+
6
+ module.exports = {
7
+ root: true,
8
+ extends: 'etherpad/plugin',
9
+ };
@@ -0,0 +1,11 @@
1
+ version: 2
2
+ updates:
3
+ - package-ecosystem: "github-actions"
4
+ directory: "/"
5
+ schedule:
6
+ interval: "daily"
7
+ - package-ecosystem: "npm"
8
+ directory: "/"
9
+ schedule:
10
+ interval: "daily"
11
+ versioning-strategy: "increase"
@@ -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
+
@@ -0,0 +1,7 @@
1
+ name: Node.js Package
2
+ on: [push]
3
+
4
+ jobs:
5
+ backend:
6
+ uses: ether/ether-pipelines/.github/workflows/test-and-release-plugins.yml@main
7
+ secrets: inherit
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "ep_author_neat2",
3
- "version": "2.0.1",
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/ep_author_neat2.git"
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/ep_author_neat2/issues"
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": "^7.28.0",
25
- "eslint-config-etherpad": "^2.0.0",
26
- "eslint-plugin-cypress": "^2.11.3",
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.0",
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": ">=12.13.0"
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,90 +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: Determine plugin name
33
- id: plugin_name
34
- run: |
35
- cd ./node_modules/__tmp
36
- npx -c 'printf %s\\n "::set-output name=plugin_name::${npm_package_name}"'
37
-
38
- - name: Rename plugin directory
39
- run: |
40
- mv ./node_modules/__tmp ./node_modules/"${PLUGIN_NAME}"
41
- env:
42
- PLUGIN_NAME: ${{ steps.plugin_name.outputs.plugin_name }}
43
-
44
- - name: Install plugin dependencies
45
- run: |
46
- cd ./node_modules/"${PLUGIN_NAME}"
47
- npm ci
48
- env:
49
- PLUGIN_NAME: ${{ steps.plugin_name.outputs.plugin_name }}
50
-
51
- # This must be run after setting up the plugin, otherwise npm will try to
52
- # hoist common dependencies by removing them from src/node_modules and
53
- # installing them in the top-level node_modules. As of v6.14.10, npm's hoist
54
- # logic appears to be buggy, because it sometimes removes dependencies from
55
- # src/node_modules but fails to add them to the top-level node_modules. Even
56
- # if npm correctly hoists the dependencies, the hoisting seems to confuse
57
- # tools such as `npm outdated`, `npm update`, and some ESLint rules.
58
- - name: Install Etherpad core dependencies
59
- run: src/bin/installDeps.sh
60
-
61
- - name: export GIT_HASH to env
62
- id: environment
63
- run: echo "::set-output name=sha_short::$(git rev-parse --short ${{ github.sha }})"
64
-
65
- - name: Create settings.json
66
- run: cp settings.json.template settings.json
67
-
68
- - name: Disable import/export rate limiting
69
- run: |
70
- sed -e '/^ *"importExportRateLimiting":/,/^ *\}/ s/"max":.*/"max": 0/' -i settings.json
71
-
72
- - name: Remove standard frontend test files
73
- run: rm -rf src/tests/frontend/specs
74
-
75
- - uses: saucelabs/sauce-connect-action@v1
76
- with:
77
- username: ${{ secrets.SAUCE_USERNAME }}
78
- accessKey: ${{ secrets.SAUCE_ACCESS_KEY }}
79
- tunnelIdentifier: ${{ steps.sauce_strings.outputs.tunnel_id }}
80
-
81
- - name: Run the frontend tests
82
- shell: bash
83
- env:
84
- SAUCE_USERNAME: ${{ secrets.SAUCE_USERNAME }}
85
- SAUCE_ACCESS_KEY: ${{ secrets.SAUCE_ACCESS_KEY }}
86
- SAUCE_NAME: ${{ steps.sauce_strings.outputs.name }}
87
- TRAVIS_JOB_NUMBER: ${{ steps.sauce_strings.outputs.tunnel_id }}
88
- GIT_HASH: ${{ steps.environment.outputs.sha_short }}
89
- run: |
90
- 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}}