Update npm dependencies

This commit is contained in:
Matt Isenhower
2026-08-30 18:56:38 -07:00
parent 3d6ac63152
commit 33a9f11557
11 changed files with 6389 additions and 14474 deletions

View File

@@ -4,7 +4,7 @@
module.exports = {
'root': true,
'extends': [
'plugin:vue/vue3-recommended',
'plugin:vue/vue2-recommended',
'eslint:recommended',
],
'rules': {
@@ -33,7 +33,9 @@ module.exports = {
'Buffer': 'readonly',
},
'env': {
'vue/setup-compiler-macros': true,
'browser': true,
'es2022': true,
'node': true,
},
'ignorePatterns': [
'src/assets/i18n/index.mjs', // "assert" syntax is currently unrecognized

View File

@@ -1,4 +1,4 @@
FROM node:20
FROM node:22
# App setup
WORKDIR /app

20673
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -1,6 +1,9 @@
{
"name": "splatoon2.ink",
"private": true,
"engines": {
"node": ">=22.12.0"
},
"scripts": {
"serve": "vue-cli-service serve",
"build": "vue-cli-service build --modern --no-clean",
@@ -19,51 +22,49 @@
"utility:updateGear": "node src/utility updateGear"
},
"dependencies": {
"@atproto/api": "^0.13.16",
"@aws-sdk/client-s3": "^3.685.0",
"axios": "^0.19.2",
"babel-eslint": "^10.1.0",
"bulma": "~0.6.1",
"bulma-tooltip": "~2.0.1",
"console-stamp": "^0.2.5",
"cozy-ical": "^1.1.22",
"cron": "^1.2.1",
"@atproto/api": "^0.20.42",
"@aws-sdk/client-s3": "^3.1121.0",
"@sentry/node": "^10.72.0",
"axios": "^1.20.0",
"bulma": "^0.9.4",
"bulma-tooltip": "^3.0.2",
"console-stamp": "^3.1.2",
"cron": "^4.4.0",
"delay": "^4.4.0",
"dotenv": "^8.2.0",
"dotenv": "^17.4.2",
"ecstatic": "^4.1.4",
"eslint": "^6.8.0",
"eslint-plugin-vue": "^9.30.0",
"he": "^1.1.1",
"json-stable-stringify": "^1.0.1",
"jsonpath": "^1.0.0",
"lodash": "^4.17.4",
"ics": "^3.12.0",
"json-stable-stringify": "^1.3.0",
"jsonpath-plus": "^10.4.0",
"lodash": "^4.18.1",
"make-runnable": "^1.3.6",
"mime-types": "^2.1.35",
"mkdirp": "^1.0.4",
"module-alias": "^2.1.0",
"moment-timezone": "^0.5.13",
"puppeteer": "^23.7.1",
"raven": "^2.1.1",
"mime-types": "^3.0.2",
"mkdirp": "^3.0.1",
"module-alias": "^2.3.4",
"moment-timezone": "^0.6.3",
"puppeteer": "^25.9.0",
"s3-sync-client": "^4.3.1",
"sharp": "^0.33.5",
"twitter-api-v2": "^1.15.0",
"sharp": "^0.35.4",
"twitter-api-v2": "^1.29.1",
"v-click-outside": "^3.0.1",
"vue": "^2.6.11",
"vue": "^2.7.16",
"vue-clipboard2": "^0.3.1",
"vue-router": "^3.4.2",
"vuex": "^3.5.1",
"vue-router": "^3.6.5",
"vuex": "^3.6.2",
"vuex-i18n": "^1.13.1"
},
"devDependencies": {
"@fullhuman/postcss-purgecss": "^2.1.0",
"@fullhuman/vue-cli-plugin-purgecss": "~2.2.0",
"@vue/cli-plugin-babel": "^4.4.6",
"@vue/cli-plugin-eslint": "^4.4.6",
"@vue/cli-service": "^4.4.6",
"@fullhuman/postcss-purgecss": "^8.0.0",
"@vue/cli-plugin-babel": "^5.0.9",
"@vue/cli-plugin-eslint": "^5.0.9",
"@vue/cli-service": "^5.0.9",
"eslint": "^8.57.1",
"eslint-plugin-vue": "^10.10.0",
"locale-man": "^0.0.5",
"sass": "^1.50.1",
"sass-loader": "^10",
"vue-template-compiler": "^2.6.11"
"sass": "^1.103.1",
"sass-loader": "^17.0.1",
"vue-template-compiler": "^2.7.16"
},
"postcss": {
"plugins": {

View File

@@ -11,14 +11,19 @@ module.exports = {
const contentWithoutStyleBlocks = content.replace(/<style[^]+?<\/style>/gi, '')
return contentWithoutStyleBlocks.match(/[A-Za-z0-9-_/:]*[A-Za-z0-9-_/]+/g) || []
},
whitelist: [
'.title:not(.is-spaced)+.subtitle', // Fix subtitle spacing
// Dynamic merchandise types
'.merchandise-box.shoes',
'.merchandise-box.head',
'.merchandise-box.clothes',
],
whitelistPatterns: [ /-(leave|enter|appear)(|-(to|from|active))$/, /^(?!(|.*?:)cursor-move).+-move$/, /^router-link(|-exact)-active$/, /data-v-.*/ ],
safelist: {
standard: [
'.title:not(.is-spaced)+.subtitle', // Fix subtitle spacing
// Dynamic merchandise types
'.merchandise-box.shoes',
'.merchandise-box.head',
'.merchandise-box.clothes',
/-(leave|enter|appear)(|-(to|from|active))$/,
/^(?!(|.*?:)cursor-move).+-move$/,
/^router-link(|-exact)-active$/,
/data-v-.*/,
],
},
})
],
}

View File

@@ -1,7 +1,7 @@
const path = require('path');
const fs = require('fs');
const mkdirp = require('mkdirp').sync;
const jsonpath = require('jsonpath');
const jsonpath = require('@/common/jsonpath');
const _ = require('lodash');
const { readJson, writeJson } = require('@/common/utilities');

View File

@@ -3,7 +3,7 @@ const mkdirp = require('mkdirp').sync;
const fs = require('fs');
const path = require('path');
const _ = require('lodash');
const jsonpath = require('jsonpath');
const jsonpath = require('@/common/jsonpath');
const { readJson, writeJson } = require('@/common/utilities');
const { languages } = require('@/common/regions');
const SplatNet = require('@/common/splatnet');

View File

@@ -2,11 +2,10 @@ const path = require('path');
const fs = require('fs');
const mkdirp = require('mkdirp').sync;
const _ = require('lodash');
const jsonpath = require('jsonpath');
const jsonpath = require('@/common/jsonpath');
const SplatNet = require('@/common/splatnet');
const iCal = require('cozy-ical');
const moment = require('moment-timezone');
const raven = require('raven');
const { createEvents } = require('ics');
const Sentry = require('@sentry/node');
const { languages } = require('@/common/regions');
const LocalizationProcessor = require('../LocalizationProcessor');
@@ -80,7 +79,7 @@ class Updater {
}
catch (e) {
// Send the error to Sentry
raven.captureException(e);
Sentry.captureException(e);
// Log the message to the console
this.error(`Couldn't handle request: ${e.toString()}`);
@@ -234,30 +233,27 @@ class Updater {
// end_time: <timestamp>,
// }
// Create a calendar object
const calendar = new iCal.VCalendar({
title: this.getCalendarTitle(),
organization: 'https://splatoon2.ink'
});
// Set the calendar's native time zone to UTC
calendar.add(new iCal.VTimezone({ timezone: 'Etc/UTC' }));
// Add event entries
for (let event of events) {
calendar.add(new iCal.VEvent({
uid: event.id,
summary: event.title,
description: event.description,
location: event.location,
startDate: moment.unix(event.start_time).utc(),
endDate: moment.unix(event.end_time).utc(),
stampDate: new Date(),
}));
}
const calendarEvents = events.map(event => ({
uid: String(event.id),
title: event.title,
description: event.description,
location: event.location,
start: event.start_time * 1000,
end: event.end_time * 1000,
startInputType: 'utc',
endInputType: 'utc',
}));
// Convert the calendar to an ICS string
return calendar.toString();
const { error, value } = createEvents(calendarEvents, {
calName: this.getCalendarTitle(),
productId: 'splatoon2.ink',
});
if (error)
throw error;
return value;
}
/**

View File

@@ -3,5 +3,5 @@ require('console-stamp')(console);
require('module-alias/register');
// Sentry error reporting
const raven = require('raven');
raven.config(process.env.SENTRY_DSN).install();
const Sentry = require('@sentry/node');
Sentry.init({ dsn: process.env.SENTRY_DSN });

26
src/common/jsonpath.js Normal file
View File

@@ -0,0 +1,26 @@
const { JSONPath } = require('jsonpath-plus');
function query(data, expression) {
return JSONPath({
json: data,
path: expression,
eval: false,
});
}
function apply(data, expression, transform) {
const matches = JSONPath({
json: data,
path: expression,
resultType: 'all',
eval: false,
});
for (const { parent, parentProperty, value } of matches) {
parent[parentProperty] = transform(value);
}
return data;
}
module.exports = { apply, query };

View File

@@ -1,3 +1,5 @@
const path = require('path')
module.exports = {
assetsDir: 'assets',
productionSourceMap: false,
@@ -37,9 +39,9 @@ module.exports = {
})
},
devServer: {
contentBase: [
'./public',
'./dist'
static: [
{ directory: path.join(__dirname, 'public') },
{ directory: path.join(__dirname, 'dist') },
]
},
pages: {