Skip to content

Commit

Permalink
Merge pull request #85 from DDMAL/upgrade-all
Browse files Browse the repository at this point in the history
Upgrade dependencies & update format check workflow
  • Loading branch information
yinanazhou authored Jul 2, 2024
2 parents d810f92 + 6e61eac commit 1d5a31c
Show file tree
Hide file tree
Showing 7 changed files with 1,126 additions and 2,455 deletions.
54 changes: 23 additions & 31 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,33 +1,25 @@
module.exports = {
"env": {
"browser": true,
"es2021": true
env: {
browser: true,
es2021: true,
},
extends: ['eslint:recommended', 'plugin:@typescript-eslint/recommended'],
overrides: [
{
env: {
node: true,
},
files: ['.eslintrc.{js,cjs}'],
parserOptions: {
sourceType: 'script',
},
},
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended"
],
"overrides": [
{
"env": {
"node": true
},
"files": [
".eslintrc.{js,cjs}"
],
"parserOptions": {
"sourceType": "script"
}
}
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": "latest",
"sourceType": "module"
},
"plugins": [
"@typescript-eslint"
],
"rules": {
}
}
],
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
},
plugins: ['@typescript-eslint'],
rules: {},
};
2 changes: 1 addition & 1 deletion .github/workflows/code-format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Run Prettier
run: npx prettier --check "**/*.ts" "**/*.css" "**/*.html"
run: npx prettier --check "**/*.ts" "**/*.css" "**/*.html" "*.js" "**/*.js"
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
assets/js/*
25 changes: 13 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,26 +22,27 @@
"license": "MIT",
"dependencies": {
"exceljs": "^4.4.0",
"handsontable": "^14.3.0",
"handsontable": "^14.4.0",
"http-server": "^14.1.1",
"mammoth": "^1.7.2",
"pouchdb": "^8.0.1",
"uuid": "^9.0.1",
"write-excel-file": "^2.0.1"
"mammoth": "^1.8.0",
"pouchdb": "^9.0.0",
"uuid": "^10.0.0",
"write-excel-file": "^2.0.3"
},
"devDependencies": {
"@types/papaparse": "^5.3.14",
"@types/pouchdb": "^6.4.2",
"@types/webpack": "^5.28.5",
"cache-loader": "^4.1.0",
"csvtojson": "^2.0.10",
"eslint": "^8.57.0",
"hard-source-webpack-plugin": "^0.13.1",
"eslint": "^9.6.0",
"node-polyfill-webpack-plugin": "^4.0.0",
"papaparse": "^5.4.1",
"pouchdb-core": "^8.0.1",
"pouchdb-core": "^9.0.0",
"prettier": "^3.3.2",
"ts-loader": "8.4.0",
"typescript": "^5.4.2",
"webpack": "4.47.0",
"webpack-cli": "4.9.2"
"ts-loader": "9.5.1",
"typescript": "^5.5.3",
"webpack": "5.92.1",
"webpack-cli": "5.1.4"
}
}
34 changes: 14 additions & 20 deletions webpack.config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
const path = require('path');
const webpack = require('webpack');
const childProcess = require('child_process');
const HardSourceWebpackPlugin = require('hard-source-webpack-plugin');
const NodePolyfillPlugin = require('node-polyfill-webpack-plugin');

module.exports = {
mode: 'production',
Expand All @@ -13,40 +12,35 @@ module.exports = {
output: {
path: path.resolve(__dirname, 'deployment', 'server', 'Cress-gh'),
publicPath: '/',
filename: '[name].js'
},
node: {
fs: 'empty'
filename: '[name].js',
},
devtool: 'inline-source-map',
module: {
rules: [
{
test: /\.tsx?$/,
use: [
'ts-loader'
],
exclude: /node_modules/
use: ['cache-loader', 'ts-loader'],
exclude: /node_modules/,
},
{
test: /Worker\.js$/,
use: [
{
loader: 'worker-loader',
options: { publicPath: '/Cress-gh/' }
}
]
}
]
options: { publicPath: '/Cress-gh/' },
},
],
},
],
},
resolve: {
extensions: [ '.ts', '.js' ]
extensions: ['.ts', '.js'],
},
plugins: [
new HardSourceWebpackPlugin(),
new NodePolyfillPlugin(),
new webpack.DefinePlugin({
__LINK_LOCATION__: JSON.stringify('/'),
__ASSET_PREFIX__: JSON.stringify('/Cress-gh/')
})
]
__ASSET_PREFIX__: JSON.stringify('/Cress-gh/'),
}),
],
};
18 changes: 7 additions & 11 deletions webpack.pages-config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
const path = require('path');
const webpack = require('webpack');
const childProcess = require('child_process');
const HardSourceWebpackPlugin = require('hard-source-webpack-plugin');
const NodePolyfillPlugin = require('node-polyfill-webpack-plugin');

module.exports = {
mode: 'production',
Expand All @@ -14,33 +13,30 @@ module.exports = {
path: path.resolve(__dirname, 'gh-pages', 'Cress', 'Cress-gh'),
filename: '[name].js',
},
node: {
fs: 'empty',
},
devtool: 'inline-source-map',
module: {
rules: [
{
test: /\.tsx?$/,
use: ['ts-loader'],
use: ['cache-loader', 'ts-loader'],
exclude: /node_modules/,
},
{
test: /Worker\.js$/,
use: [
{
loader: 'worker-loader',
options: { publicPath: '/Cress-gh/' }
}
]
}
options: { publicPath: '/Cress-gh/' },
},
],
},
],
},
resolve: {
extensions: ['.ts', '.js'],
},
plugins: [
new HardSourceWebpackPlugin(),
new NodePolyfillPlugin(),
new webpack.DefinePlugin({
__LINK_LOCATION__: JSON.stringify('https://ddmal.music.mcgill.ca/Cress/'),
__ASSET_PREFIX__: JSON.stringify('/Cress/Cress-gh/'),
Expand Down
Loading

0 comments on commit 1d5a31c

Please sign in to comment.