-
Notifications
You must be signed in to change notification settings - Fork 72
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update dependencies, require node 20 #775
base: develop
Are you sure you want to change the base?
Changes from all commits
f280497
1692062
81b29b3
b8c5c6b
1777f11
8790e83
4efd49e
5cbd1f4
7f3cdec
af9075b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,7 +10,7 @@ jobs: | |
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
node_version: [16, 18] | ||
node_version: [20] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Use Node.js | ||
|
@@ -24,7 +24,7 @@ jobs: | |
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
node_version: [16, 18] | ||
node_version: [20] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Use Node.js | ||
|
@@ -38,7 +38,7 @@ jobs: | |
runs-on: ubuntu-latest | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ideally we should make sure this works before merging. |
||
strategy: | ||
matrix: | ||
node_version: [16, 18] | ||
node_version: [20] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Use Node.js | ||
|
@@ -51,5 +51,5 @@ jobs: | |
docker run --detach --publish 5432:5432 \ | ||
--env POSTGRES_PASSWORD=pass \ | ||
--env POSTGRES_INITDB_ARGS="--lc-collate C --lc-ctype C --encoding UTF8" \ | ||
postgres:13 | ||
postgres:16 | ||
- run: yarn test:postgres |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Drop support for Node 16 and 18, require Node 20. |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ | |
"version": "2.1.2", | ||
"description": "A Matrix <--> Slack bridge", | ||
"engines": { | ||
"node": ">=16 <=18" | ||
"node": ">=20" | ||
}, | ||
"main": "app.js", | ||
"scripts": { | ||
|
@@ -35,64 +35,65 @@ | |
"homepage": "https://github.com/matrix-org/matrix-appservice-slack#readme", | ||
"dependencies": { | ||
"@alloc/quick-lru": "^5.2.0", | ||
"@slack/logger": "^3.0.0", | ||
"@slack/rtm-api": "^6.0.0", | ||
"@slack/logger": "^4.0.0", | ||
"@slack/rtm-api": "^6.2.1", | ||
"@slack/web-api": "^6.7.2", | ||
"Slackdown": "git+https://[email protected]/half-shot/slackdown.git", | ||
"ajv": "^8.12.0", | ||
"axios": "^0.27.2", | ||
"classnames": "^2.3.2", | ||
"axios": "^1.6.8", | ||
"classnames": "^2.5.1", | ||
"escape-string-regexp": "^4.0.0", | ||
"https-proxy-agent": "^5.0.1", | ||
"matrix-appservice-bridge": "^8.1.2", | ||
"matrix-widget-api": "^1.1.1", | ||
"minimist": "^1.2.6", | ||
"https-proxy-agent": "^7.0.4", | ||
"matrix-appservice-bridge": "^10.1.0", | ||
"matrix-bot-sdk": "^0.7.1", | ||
"matrix-widget-api": "^1.6.0", | ||
"minimist": "^1.2.8", | ||
"nedb": "^1.8.0", | ||
"node-emoji": "^1.10.0", | ||
"node-emoji": "^2.1.3", | ||
"nunjucks": "^3.2.4", | ||
"p-queue": "^6.0.0", | ||
"pg-promise": "^10.11.1", | ||
"randomstring": "^1.2.1", | ||
"pg-promise": "^11.5.5", | ||
"randomstring": "^1.3.0", | ||
"react": "^18.2.0", | ||
"react-dom": "^18.2.0", | ||
"url-join": "^5.0.0", | ||
"uuid": "^8.3.2", | ||
"yargs": "17.5.1" | ||
"uuid": "^9.0.1", | ||
"yargs": "17.7.2" | ||
}, | ||
"devDependencies": { | ||
"@tailwindcss/forms": "^0.5.3", | ||
"@tsconfig/node16": "^1.0.3", | ||
"@types/chai": "^4.2.21", | ||
"@types/js-yaml": "^4.0.2", | ||
"@types/mocha": "^9.1.1", | ||
"@types/nedb": "^1.8.12", | ||
"@types/node": "^18.6.1", | ||
"@types/node-emoji": "^1.8.1", | ||
"@types/nunjucks": "^3.1.5", | ||
"@types/randomstring": "^1.1.7", | ||
"@types/react": "^18.0.27", | ||
"@types/react-dom": "^18.0.10", | ||
"@types/uuid": "^8.3.1", | ||
"@types/yargs": "17.0.10", | ||
"@typescript-eslint/eslint-plugin": "^5.0.0", | ||
"@typescript-eslint/parser": "^5.50.0", | ||
"@vitejs/plugin-react": "^3.1.0", | ||
"autoprefixer": "^10.4.13", | ||
"@tailwindcss/forms": "^0.5.7", | ||
"@tsconfig/node20": "^20.1.3", | ||
"@types/chai": "^4.3.14", | ||
"@types/js-yaml": "^4.0.9", | ||
"@types/mocha": "^10.0.6", | ||
"@types/nedb": "^1.8.16", | ||
"@types/node": "^20.11.30", | ||
"@types/node-emoji": "^2.1.0", | ||
"@types/nunjucks": "^3.2.6", | ||
"@types/randomstring": "^1.1.12", | ||
"@types/react": "^18.2.71", | ||
"@types/react-dom": "^18.2.22", | ||
"@types/uuid": "^9.0.8", | ||
"@types/yargs": "17.0.32", | ||
"@typescript-eslint/eslint-plugin": "^7.4.0", | ||
"@typescript-eslint/parser": "^7.4.0", | ||
"@vitejs/plugin-react": "^4.2.1", | ||
"autoprefixer": "^10.4.19", | ||
"chai": "^4.3.4", | ||
"eslint": "^8.20.0", | ||
"eslint-plugin-jsdoc": "^39.3.3", | ||
"eslint": "^8.57.0", | ||
"eslint-plugin-jsdoc": "^48.2.1", | ||
"eslint-plugin-prefer-arrow": "^1.2.3", | ||
"eslint-plugin-react": "^7.32.2", | ||
"eslint-plugin-react": "^7.34.1", | ||
"eslint-plugin-react-hooks": "^4.6.0", | ||
"js-yaml": "^4.1.0", | ||
"mocha": "^10.0.0", | ||
"postcss": "^8.4.38", | ||
"prom-client": "^15.1.0", | ||
"nyc": "^15.1.0", | ||
"postcss": "^8.4.21", | ||
"prom-client": "^14.0.1", | ||
"source-map-support": "^0.5.19", | ||
"tailwindcss": "^3.2.4", | ||
"ts-node": "^10.1.0", | ||
"typescript": "^4.4.3", | ||
"vite": "^4.1.1" | ||
"tailwindcss": "^3.4.1", | ||
"ts-node": "^10.9.2", | ||
"typescript": "^5.4.3", | ||
"vite": "^5.2.6" | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,14 +25,6 @@ const log = new Logger("substitutions"); | |
const ATTACHMENT_TYPES = ["m.audio", "m.video", "m.file", "m.image"]; | ||
const PILL_REGEX = /<a href="https:\/\/matrix\.to\/#\/(#|@|\+)([^"]+)">([^<]+)<\/a>/g; | ||
|
||
/** | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Assuming this is now part of the functionality. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Correct. I've now added tests to verify this. |
||
* Will return the emoji's name within ':'. | ||
* @param name The emoji's name. | ||
*/ | ||
export const getFallbackForMissingEmoji = (name: string): string => ( | ||
`:${name}:` | ||
); | ||
|
||
interface PillItem { | ||
id: string; | ||
text: string; | ||
|
@@ -74,7 +66,7 @@ class Substitutions { | |
body = url ? body.replace(file.permalink, url) : body; | ||
} | ||
|
||
body = emoji.emojify(body, getFallbackForMissingEmoji); | ||
body = emoji.emojify(body); | ||
|
||
return body; | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
N.B. Remember to update the Dockerfile.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done in af9075b