Skip to content

Commit

Permalink
Upgrade dependencies
Browse files Browse the repository at this point in the history
- Upgrade node to 22
- Remove sass @import usage
  • Loading branch information
Trinovantes committed Nov 30, 2024
1 parent 64be7c1 commit f511e35
Show file tree
Hide file tree
Showing 10 changed files with 1,061 additions and 878 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/pages-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
- name: Set up node
uses: actions/setup-node@v4
with:
node-version: 20.x
node-version: 22
registry-url: https://registry.npmjs.org
cache: yarn

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
- name: Set up node
uses: actions/setup-node@v4
with:
node-version: 20.x
node-version: 22
registry-url: https://registry.npmjs.org
cache: yarn

Expand Down
4 changes: 2 additions & 2 deletions demo/css/main.scss
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
@import './reset.scss';
@import './quasar.scss';
@use './reset.scss';
@use './quasar.scss';
10 changes: 6 additions & 4 deletions demo/css/quasar.scss
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
@use "sass:math";
@use 'sass:color';
@use 'sass:math';
@use './variables.scss' as *;

@import '@quasar/extras/roboto-font/roboto-font.css';
@import '@quasar/extras/material-icons/material-icons.css';
@import 'quasar/src/css/index.sass';
@use '@quasar/extras/roboto-font/roboto-font.css';
@use '@quasar/extras/material-icons/material-icons.css';
@use 'quasar/src/css/index.sass';

body.mobile{
.q-focus-helper{
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
"@types/katex": "^0.16.7",
"@types/lodash.debounce": "^4.0.9",
"@types/lodash.merge": "^4.6.9",
"@types/node": "^20.7.0",
"@types/node": "^22.10.0",
"@vitejs/plugin-vue": "^5.0.5",
"date-fns": "^4.1.0",
"eslint": "^9.4.0",
Expand All @@ -77,7 +77,7 @@
"sass": "^1.77.6",
"typescript": "^5.4.5",
"typescript-eslint": "^8.0.0-alpha.24",
"vite": "^5.2.12",
"vite": "^6.0.1",
"vite-plugin-dts": "^4.0.2",
"vitest": "^2.0.5",
"vue": "^3.4.30",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
diff --git a/node_modules/@vitejs/plugin-vue/package.json b/node_modules/@vitejs/plugin-vue/package.json
index 89755a4..ee7bde9 100644
index a4cb84c..543d864 100644
--- a/node_modules/@vitejs/plugin-vue/package.json
+++ b/node_modules/@vitejs/plugin-vue/package.json
@@ -1,7 +1,7 @@
{
"name": "@vitejs/plugin-vue",
"version": "5.1.4",
"version": "5.2.1",
- "type": "commonjs",
+ "type": "module",
"license": "MIT",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ index d278d41..2cf78bb 100644
+++ b/node_modules/quasar/package.json
@@ -2,11 +2,6 @@
"name": "quasar",
"version": "2.17.0",
"version": "2.17.4",
"description": "Build high-performance VueJS user interfaces (SPA, PWA, SSR, Mobile and Desktop) in record time",
- "type": "module",
- "module": "dist/quasar.client.js",
Expand Down
31 changes: 31 additions & 0 deletions patches/vue-tsc+2.1.10.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
diff --git a/node_modules/vue-tsc/index.js b/node_modules/vue-tsc/index.js
index a680d25..eb49461 100644
--- a/node_modules/vue-tsc/index.js
+++ b/node_modules/vue-tsc/index.js
@@ -4,7 +4,8 @@ exports.run = run;
const runTsc_1 = require("@volar/typescript/lib/quickstart/runTsc");
const vue = require("@vue/language-core");
const windowsPathReg = /\\/g;
-function run(tscPath = require.resolve('typescript/lib/tsc')) {
+const semver = require('semver');
+function run(tscPath = getTscPath()) {
let runExtensions = ['.vue'];
const extensionsChangedException = new Error('extensions changed');
const main = () => (0, runTsc_1.runTsc)(tscPath, runExtensions, (ts, options) => {
@@ -35,4 +36,16 @@ function run(tscPath = require.resolve('typescript/lib/tsc')) {
}
}
}
+
+function getTscPath() {
+ const version = require('typescript/package.json').version;
+
+ if (semver.gte(version, '5.7.0')) {
+ return require.resolve('typescript/lib/_tsc');
+ }
+ else {
+ return require.resolve('typescript/lib/tsc');
+ }
+}
+
//# sourceMappingURL=index.js.map
19 changes: 15 additions & 4 deletions vite.config.demo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ import vue from '@vitejs/plugin-vue'
import path from 'node:path'
import { quasar, transformAssetUrls } from '@quasar/vite-plugin'
import { commonConfig } from './vite.config.js'
import packageJson from './package.json'
import packageJson from './package.json' with { type: 'json' }
import { fileURLToPath } from 'node:url'

export default mergeConfig(commonConfig, defineConfig({
root: path.resolve(__dirname, './demo'),
Expand All @@ -22,14 +23,24 @@ export default mergeConfig(commonConfig, defineConfig({
'import.meta.env.PROJECT_DESC': JSON.stringify(packageJson.description),
},

css: {
preprocessorOptions: {
scss: {
additionalData(source: string, filename: string) {
return filename.endsWith('sass')
? `@use "sass:color"\n@use "sass:math"\n@use "${fileURLToPath(new URL('./demo/css/variables.scss', import.meta.url))}" as *\n` + source
: `@use "sass:color"; @use "sass:math"; @use "${fileURLToPath(new URL('./demo/css/variables.scss', import.meta.url))}" as *;` + source
},
},
},
},

plugins: [
vue({
template: {
transformAssetUrls,
},
}),
quasar({
sassVariables: './demo/css/variables.scss',
}),
quasar(),
],
}))
Loading

0 comments on commit f511e35

Please sign in to comment.