Skip to content

Commit 67d3570

Browse files
authored
Update dependencies and minimum node version requirements (#817)
* Bump node versions - min version v16 * Bump minimum node version to v18 Update dependencies
1 parent 9c93841 commit 67d3570

12 files changed

+2271
-1614
lines changed

.eslintrc.js

-21
This file was deleted.

.github/workflows/doc-publish.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
- name: Set up node
1616
uses: actions/setup-node@v1
1717
with:
18-
node-version: 14
18+
node-version: 20
1919

2020
- name: Install yarn
2121
run: npm install -g yarn

.github/workflows/npmpublish.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
- name: Set up node
2020
uses: actions/setup-node@v1
2121
with:
22-
node-version: 14
22+
node-version: 20
2323

2424
- name: Install yarn
2525
run: npm install -g yarn
@@ -58,15 +58,15 @@ jobs:
5858

5959
- name: Install dependencies
6060
run: yarn install --frozen-lockfile
61-
61+
6262
- name: Cache node modules
6363
uses: actions/cache@v1
6464
with:
6565
path: node_modules
6666
key: yarn-deps-${{ hashFiles('yarn.lock') }}
6767
restore-keys: |
6868
yarn-deps-${{ hashFiles('yarn.lock') }}
69-
69+
7070
- name: Create Release
7171
env:
7272
GH_TOKEN: ${{ secrets.GH_TOKEN }}

.github/workflows/run-tests.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
- name: Set up node
1515
uses: actions/setup-node@v1
1616
with:
17-
node-version: 18
17+
node-version: 20
1818

1919
- name: Install yarn
2020
run: npm install -g yarn

.travis.yml

-13
This file was deleted.

README.md

+1-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
<a href="https://standardjs.com"><img src="https://img.shields.io/badge/code_style-standard-blue.svg?style=flat-square" alt="JavaScript Style Guide"/></a>
1010
<a href="https://discord.gg/R5GVSyTVGv"><img src="https://img.shields.io/badge/discord-noblox.js-blue.svg?style=flat-square" alt="noblox.js Discord"/></a>
1111
<a href="https://npmjs.org/noblox.js"><img src="https://img.shields.io/npm/v/noblox.js.svg?style=flat-square" alt="NPM package"/>
12-
<a href="https://travis-ci.org/noblox/noblox.js"><img src="https://img.shields.io/travis/noblox/noblox.js/master.svg?style=flat-square" alt="Travis Build Status"/></a></a>
1312
</p>
1413

1514
<p align="center">
@@ -38,7 +37,7 @@ If you are looking for more information on how to create something like this, ch
3837

3938
## Prerequisites
4039

41-
- [**Node.js®**](https://nodejs.org/en/download/current/)
40+
- [**Node.js®**](https://nodejs.org/en/download/current/) v18.18 or later
4241

4342
---
4443

eslint.config.mjs

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
import jest from "eslint-plugin-jest";
2+
import globals from "globals";
3+
import path from "node:path";
4+
import { fileURLToPath } from "node:url";
5+
import js from "@eslint/js";
6+
import { FlatCompat } from "@eslint/eslintrc";
7+
8+
const __filename = fileURLToPath(import.meta.url);
9+
const __dirname = path.dirname(__filename);
10+
const compat = new FlatCompat({
11+
baseDirectory: __dirname,
12+
recommendedConfig: js.configs.recommended,
13+
allConfig: js.configs.all
14+
});
15+
16+
export default [...compat.extends("standard", "plugin:jest/recommended"), {
17+
plugins: {
18+
jest,
19+
},
20+
21+
languageOptions: {
22+
globals: {
23+
...globals.commonjs,
24+
...globals.node,
25+
Atomics: "readonly",
26+
SharedArrayBuffer: "readonly",
27+
},
28+
29+
ecmaVersion: 2018,
30+
sourceType: "commonjs",
31+
},
32+
33+
rules: {},
34+
}];

lib/privatemessages/getMessages.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ function getMessages (jar, pageNumber, pageSize, messageTab) {
2525
url: `//privatemessages.roblox.com/v1/messages?pageNumber=${pageNumber}&pageSize=${pageSize}&messageTab=${messageTab}`,
2626
options: {
2727
method: 'GET',
28-
jar: jar,
28+
jar,
2929
resolveWithFullResponse: true
3030
}
3131
}

lib/privatemessages/onMessage.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -34,17 +34,17 @@ exports.func = function (args) {
3434
const onMessage = new events.EventEmitter()
3535
let waitingForRequest = false
3636
let latest
37-
getMessages({ jar: jar, messageTab: 'Inbox', pageNumber: 0, pageSize: 1 })
37+
getMessages({ jar, messageTab: 'Inbox', pageNumber: 0, pageSize: 1 })
3838
.then(function (initial) {
3939
latest = initial.collection[0] ? initial.collection[0].id : 0
40-
const notifications = onNotification({ jar: jar })
40+
const notifications = onNotification({ jar })
4141
notifications.on('data', function (name, message) {
4242
if (name === 'MessageNotification' && message.Type === 'Created') {
4343
if (waitingForRequest) {
4444
waitingForRequest = false
4545
} else {
4646
getMessages({
47-
jar: jar,
47+
jar,
4848
messageTab: 'Inbox',
4949
pageNumber: 0,
5050
pageSize: 1

package.json

+23-21
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"docs": "jsdoc -c jsDocsConfig.json -r -t ./node_modules/better-docs",
99
"lint": "eslint lib/",
1010
"test": "jest",
11-
"postinstall": "node postinstall.js"
11+
"postinstall": "node postinstall.mjs"
1212
},
1313
"repository": {
1414
"type": "git",
@@ -20,11 +20,11 @@
2020
"clans"
2121
],
2222
"dependencies": {
23-
"@microsoft/signalr": "^8.0.0",
24-
"chalk": "^4.0.0",
23+
"@microsoft/signalr": "^8.0.7",
24+
"chalk": "^5.3.0",
2525
"cheerio": "^1.0.0-rc.10",
26-
"entities": "^4.3.0",
27-
"figlet": "^1.4.0",
26+
"entities": "^5.0.0",
27+
"figlet": "^1.7.0",
2828
"postman-request": "^2.88.1-postman.34",
2929
"signalr-client": "0.0.20"
3030
},
@@ -40,22 +40,23 @@
4040
],
4141
"homepage": "https://github.com/noblox/noblox.js",
4242
"devDependencies": {
43-
"@auto-it/conventional-commits": "^10.30.0",
44-
"auto": "^10.30.0",
45-
"better-docs": "2.7.2",
46-
"dotenv": "16.0.3",
47-
"eslint": "^7.28.0",
48-
"eslint-config-standard": "^16.0.3",
49-
"eslint-plugin-import": "^2.25.3",
50-
"eslint-plugin-jest": "27.2.2",
51-
"eslint-plugin-node": "^11.0.0",
52-
"eslint-plugin-promise": "^5.1.0",
53-
"jest": "^29.5.0",
54-
"jest-extended": "^3.2.4",
55-
"jsdoc": "3.6.10",
43+
"@auto-it/conventional-commits": "^11.2.0",
5644
"JSONStream": "^1.3.1",
45+
"auto": "^11.2.0",
46+
"better-docs": "2.7.3",
47+
"dotenv": "16.4.5",
48+
"eslint": "^9.8.0",
49+
"eslint-config-standard": "^17.1.0",
50+
"eslint-plugin-import": "^2.29.1",
51+
"eslint-plugin-jest": "28.6.0",
52+
"eslint-plugin-n": "^17.10.1",
53+
"eslint-plugin-node": "^11.0.0",
54+
"eslint-plugin-promise": "^7.0.0",
55+
"jest": "^29.7.0",
56+
"jest-extended": "^4.0.2",
57+
"jsdoc": "4.0.3",
5758
"progress": "^2.0.0",
58-
"standard": "^17.0.0"
59+
"standard": "^17.1.0"
5960
},
6061
"jest": {
6162
"setupFiles": [
@@ -83,6 +84,7 @@
8384
"onlyPublishWithReleaseLabel": true
8485
},
8586
"engines": {
86-
"node": ">=14.14.0"
87-
}
87+
"node": ">=18.18"
88+
},
89+
"packageManager": "yarn@1.22.19+sha1.4ba7fc5c6e704fce2066ecbfb0b0d8976fe62447"
8890
}

postinstall.js postinstall.mjs

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
const chalk = require('chalk')
2-
const figlet = require('figlet')
1+
import {Chalk} from 'chalk'
2+
import figlet from 'figlet'
33

4+
const chalk = new Chalk();
45
console.log(chalk.yellow(figlet.textSync('noblox.js', {
56
font: 'Big',
67
horizontalLayout: 'default',

0 commit comments

Comments
 (0)