Skip to content

Commit

Permalink
Bump minimum node version to v18
Browse files Browse the repository at this point in the history
Update dependencies
  • Loading branch information
Neztore committed Jul 31, 2024
1 parent 9bdba2f commit bce64e1
Show file tree
Hide file tree
Showing 9 changed files with 2,266 additions and 1,609 deletions.
21 changes: 0 additions & 21 deletions .eslintrc.js

This file was deleted.

13 changes: 0 additions & 13 deletions .travis.yml

This file was deleted.

3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
<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>
<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>
<a href="https://npmjs.org/noblox.js"><img src="https://img.shields.io/npm/v/noblox.js.svg?style=flat-square" alt="NPM package"/>
<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>
</p>

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

## Prerequisites

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

---

Expand Down
34 changes: 34 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
import jest from "eslint-plugin-jest";
import globals from "globals";
import path from "node:path";
import { fileURLToPath } from "node:url";
import js from "@eslint/js";
import { FlatCompat } from "@eslint/eslintrc";

const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
const compat = new FlatCompat({
baseDirectory: __dirname,
recommendedConfig: js.configs.recommended,
allConfig: js.configs.all
});

export default [...compat.extends("standard", "plugin:jest/recommended"), {
plugins: {
jest,
},

languageOptions: {
globals: {
...globals.commonjs,
...globals.node,
Atomics: "readonly",
SharedArrayBuffer: "readonly",
},

ecmaVersion: 2018,
sourceType: "commonjs",
},

rules: {},
}];
2 changes: 1 addition & 1 deletion lib/privatemessages/getMessages.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ function getMessages (jar, pageNumber, pageSize, messageTab) {
url: `//privatemessages.roblox.com/v1/messages?pageNumber=${pageNumber}&pageSize=${pageSize}&messageTab=${messageTab}`,
options: {
method: 'GET',
jar: jar,
jar,
resolveWithFullResponse: true
}
}
Expand Down
6 changes: 3 additions & 3 deletions lib/privatemessages/onMessage.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,17 +34,17 @@ exports.func = function (args) {
const onMessage = new events.EventEmitter()
let waitingForRequest = false
let latest
getMessages({ jar: jar, messageTab: 'Inbox', pageNumber: 0, pageSize: 1 })
getMessages({ jar, messageTab: 'Inbox', pageNumber: 0, pageSize: 1 })
.then(function (initial) {
latest = initial.collection[0] ? initial.collection[0].id : 0
const notifications = onNotification({ jar: jar })
const notifications = onNotification({ jar })
notifications.on('data', function (name, message) {
if (name === 'MessageNotification' && message.Type === 'Created') {
if (waitingForRequest) {
waitingForRequest = false
} else {
getMessages({
jar: jar,
jar,
messageTab: 'Inbox',
pageNumber: 0,
pageSize: 1
Expand Down
44 changes: 23 additions & 21 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"docs": "jsdoc -c jsDocsConfig.json -r -t ./node_modules/better-docs",
"lint": "eslint lib/",
"test": "jest",
"postinstall": "node postinstall.js"
"postinstall": "node postinstall.mjs"
},
"repository": {
"type": "git",
Expand All @@ -20,11 +20,11 @@
"clans"
],
"dependencies": {
"@microsoft/signalr": "^8.0.0",
"chalk": "^4.0.0",
"@microsoft/signalr": "^8.0.7",
"chalk": "^5.3.0",
"cheerio": "^1.0.0-rc.10",
"entities": "^4.3.0",
"figlet": "^1.4.0",
"entities": "^5.0.0",
"figlet": "^1.7.0",
"postman-request": "^2.88.1-postman.34",
"signalr-client": "0.0.20"
},
Expand All @@ -40,22 +40,23 @@
],
"homepage": "https://github.com/noblox/noblox.js",
"devDependencies": {
"@auto-it/conventional-commits": "^10.30.0",
"auto": "^10.30.0",
"better-docs": "2.7.2",
"dotenv": "16.0.3",
"eslint": "^7.28.0",
"eslint-config-standard": "^16.0.3",
"eslint-plugin-import": "^2.25.3",
"eslint-plugin-jest": "27.2.2",
"eslint-plugin-node": "^11.0.0",
"eslint-plugin-promise": "^5.1.0",
"jest": "^29.5.0",
"jest-extended": "^3.2.4",
"jsdoc": "3.6.10",
"@auto-it/conventional-commits": "^11.2.0",
"JSONStream": "^1.3.1",
"auto": "^11.2.0",
"better-docs": "2.7.3",
"dotenv": "16.4.5",
"eslint": "^9.8.0",
"eslint-config-standard": "^17.1.0",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-jest": "28.6.0",
"eslint-plugin-n": "^17.10.1",
"eslint-plugin-node": "^11.0.0",
"eslint-plugin-promise": "^7.0.0",
"jest": "^29.7.0",
"jest-extended": "^4.0.2",
"jsdoc": "4.0.3",
"progress": "^2.0.0",
"standard": "^17.0.0"
"standard": "^17.1.0"
},
"jest": {
"setupFiles": [
Expand Down Expand Up @@ -83,6 +84,7 @@
"onlyPublishWithReleaseLabel": true
},
"engines": {
"node": ">=16"
}
"node": ">=18.18"
},
"packageManager": "yarn@1.22.19+sha1.4ba7fc5c6e704fce2066ecbfb0b0d8976fe62447"
}
5 changes: 3 additions & 2 deletions postinstall.js → postinstall.mjs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
const chalk = require('chalk')
const figlet = require('figlet')
import {Chalk} from 'chalk'
import figlet from 'figlet'

const chalk = new Chalk();
console.log(chalk.yellow(figlet.textSync('noblox.js', {
font: 'Big',
horizontalLayout: 'default',
Expand Down
Loading

0 comments on commit bce64e1

Please sign in to comment.