Update dependencies (#63)
This commit is contained in:
commit
f56cf1412c
6 changed files with 2137 additions and 2154 deletions
4
.github/workflows/check.yml
vendored
4
.github/workflows/check.yml
vendored
|
@ -22,10 +22,10 @@ jobs:
|
||||||
- uses: pnpm/action-setup@v2
|
- uses: pnpm/action-setup@v2
|
||||||
with:
|
with:
|
||||||
version: 8
|
version: 8
|
||||||
- name: Use latest Node.js
|
- name: Use Node.js 18
|
||||||
uses: actions/setup-node@v3
|
uses: actions/setup-node@v3
|
||||||
with:
|
with:
|
||||||
node-version: 18
|
node-version: "^18.17.0"
|
||||||
cache: "pnpm"
|
cache: "pnpm"
|
||||||
- run: pnpm install
|
- run: pnpm install
|
||||||
- run: pnpm check
|
- run: pnpm check
|
||||||
|
|
5
.github/workflows/deploy-deno.yml
vendored
5
.github/workflows/deploy-deno.yml
vendored
|
@ -18,6 +18,11 @@ jobs:
|
||||||
- uses: pnpm/action-setup@v2
|
- uses: pnpm/action-setup@v2
|
||||||
with:
|
with:
|
||||||
version: 8
|
version: 8
|
||||||
|
- name: Use Node.js 18
|
||||||
|
uses: actions/setup-node@v3
|
||||||
|
with:
|
||||||
|
node-version: "^18.17.0"
|
||||||
|
cache: "pnpm"
|
||||||
|
|
||||||
- run: pnpm install --frozen-lockfile
|
- run: pnpm install --frozen-lockfile
|
||||||
|
|
||||||
|
|
|
@ -1,10 +1,7 @@
|
||||||
#!/usr/bin/env sh
|
|
||||||
# This file is part of Share₂Fedi
|
# This file is part of Share₂Fedi
|
||||||
# https://github.com/kytta/share2fedi
|
# https://github.com/kytta/share2fedi
|
||||||
#
|
#
|
||||||
# SPDX-FileCopyrightText: © 2023 Nikita Karamov <me@kytta.dev>
|
# SPDX-FileCopyrightText: © 2023 Nikita Karamov <me@kytta.dev>
|
||||||
# SPDX-License-Identifier: CC0-1.0
|
# SPDX-License-Identifier: CC0-1.0
|
||||||
|
|
||||||
. "$(dirname -- "$0")/_/husky.sh"
|
|
||||||
|
|
||||||
npx lint-staged
|
npx lint-staged
|
||||||
|
|
|
@ -7,14 +7,16 @@
|
||||||
* SPDX-License-Identifier: AGPL-3.0-only
|
* SPDX-License-Identifier: AGPL-3.0-only
|
||||||
*/
|
*/
|
||||||
import { defineConfig } from "astro/config";
|
import { defineConfig } from "astro/config";
|
||||||
import lightningcss from "vite-plugin-lightningcss";
|
|
||||||
|
|
||||||
import cloudflare from "@astrojs/cloudflare";
|
import cloudflare from "@astrojs/cloudflare";
|
||||||
import deno from "@astrojs/deno";
|
import deno from "@astrojs/deno";
|
||||||
import netlify from "@astrojs/netlify/functions";
|
import netlify from "@astrojs/netlify";
|
||||||
import node from "@astrojs/node";
|
import node from "@astrojs/node";
|
||||||
import vercel from "@astrojs/vercel/serverless";
|
import vercel from "@astrojs/vercel/serverless";
|
||||||
|
|
||||||
|
import browserslist from "browserslist";
|
||||||
|
import { browserslistToTargets, transform } from "lightningcss";
|
||||||
|
|
||||||
let adapterConfig = {};
|
let adapterConfig = {};
|
||||||
if (process.env.VERCEL) {
|
if (process.env.VERCEL) {
|
||||||
console.info("Using Vercel (serverless) adapter...");
|
console.info("Using Vercel (serverless) adapter...");
|
||||||
|
@ -24,7 +26,7 @@ if (process.env.VERCEL) {
|
||||||
}),
|
}),
|
||||||
};
|
};
|
||||||
} else if (process.env.CF_PAGES) {
|
} else if (process.env.CF_PAGES) {
|
||||||
console.info("Using Cloudflare adapter...");
|
console.info("Using Cloudflare (Pages) adapter...");
|
||||||
adapterConfig = {
|
adapterConfig = {
|
||||||
adapter: cloudflare(),
|
adapter: cloudflare(),
|
||||||
};
|
};
|
||||||
|
@ -48,6 +50,29 @@ if (process.env.VERCEL) {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const lightningCssPlugin = () => {
|
||||||
|
const targets = browserslistToTargets(browserslist());
|
||||||
|
return {
|
||||||
|
name: "vite-plugin-lightningcss",
|
||||||
|
transform(source: string, id: string) {
|
||||||
|
if (!id.endsWith(".css")) return;
|
||||||
|
|
||||||
|
const { code, map } = transform({
|
||||||
|
filename: id,
|
||||||
|
code: Buffer.from(source),
|
||||||
|
minify: true,
|
||||||
|
sourceMap: true,
|
||||||
|
targets,
|
||||||
|
});
|
||||||
|
return {
|
||||||
|
code: code.toString(),
|
||||||
|
// eslint-disable-next-line unicorn/no-null
|
||||||
|
map: map ? map.toString() : null,
|
||||||
|
};
|
||||||
|
},
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
site: "https://s2f.kytta.dev",
|
site: "https://s2f.kytta.dev",
|
||||||
|
|
||||||
|
@ -55,6 +80,6 @@ export default defineConfig({
|
||||||
...adapterConfig,
|
...adapterConfig,
|
||||||
|
|
||||||
vite: {
|
vite: {
|
||||||
plugins: [lightningcss()],
|
plugins: [lightningCssPlugin()],
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
56
package.json
56
package.json
|
@ -28,39 +28,40 @@
|
||||||
"fix:prettier": "prettier --write --ignore-unknown --plugin=prettier-plugin-astro",
|
"fix:prettier": "prettier --write --ignore-unknown --plugin=prettier-plugin-astro",
|
||||||
"fix:stylelint": "stylelint --fix",
|
"fix:stylelint": "stylelint --fix",
|
||||||
"test": "pnpm run check",
|
"test": "pnpm run check",
|
||||||
"prepare": "husky install"
|
"prepare": "husky"
|
||||||
},
|
},
|
||||||
"browserslist": "cover 95%, last 2 versions, Firefox ESR, not dead",
|
"browserslist": "cover 95%, last 2 versions, Firefox ESR, not dead",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@astrojs/cloudflare": "^7.5.1",
|
"@astrojs/cloudflare": "^9.0.0",
|
||||||
"@astrojs/deno": "^5.0.1",
|
"@astrojs/deno": "^5.0.1",
|
||||||
"@astrojs/netlify": "^3.0.2",
|
"@astrojs/netlify": "^5.1.1",
|
||||||
"@astrojs/node": "^6.0.3",
|
"@astrojs/node": "^8.2.0",
|
||||||
"@astrojs/vercel": "^5.0.2",
|
"@astrojs/vercel": "^7.3.0",
|
||||||
"@nanostores/persistent": "^0.9.1",
|
"@nanostores/persistent": "^0.9.1",
|
||||||
"astro": "^3.2.3",
|
"astro": "^4.3.6",
|
||||||
"nanostores": "^0.9.3"
|
"nanostores": "^0.9.5"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@astrojs/check": "^0.2.0",
|
"@astrojs/check": "^0.5.3",
|
||||||
"@types/node": "^18.18.4",
|
"@types/node": "^18.17.0",
|
||||||
"@typescript-eslint/eslint-plugin": "^6.7.4",
|
"@typescript-eslint/eslint-plugin": "^6.21.0",
|
||||||
"@typescript-eslint/parser": "^6.7.4",
|
"@typescript-eslint/parser": "^6.21.0",
|
||||||
"eslint": "^8.51.0",
|
"browserslist": "^4.22.3",
|
||||||
"eslint-config-prettier": "^9.0.0",
|
"eslint": "^8.56.0",
|
||||||
"eslint-plugin-astro": "^0.29.1",
|
"eslint-config-prettier": "^9.1.0",
|
||||||
"eslint-plugin-unicorn": "^48.0.1",
|
"eslint-plugin-astro": "^0.31.4",
|
||||||
"husky": "^8.0.3",
|
"eslint-plugin-unicorn": "^51.0.1",
|
||||||
"lint-staged": "^14.0.1",
|
"husky": "^9.0.10",
|
||||||
"prettier": "^3.0.3",
|
"lightningcss": "^1.23.0",
|
||||||
"prettier-plugin-astro": "^0.12.0",
|
"lint-staged": "^15.2.2",
|
||||||
"sass": "^1.69.0",
|
"prettier": "^3.2.5",
|
||||||
"sharp": "^0.32.6",
|
"prettier-plugin-astro": "^0.13.0",
|
||||||
"stylelint": "^15.10.3",
|
"sass": "^1.70.0",
|
||||||
"stylelint-config-standard-scss": "^11.0.0",
|
"sharp": "^0.33.2",
|
||||||
"svgo": "^3.0.2",
|
"stylelint": "^16.2.1",
|
||||||
"typescript": "^5.2.2",
|
"stylelint-config-standard-scss": "^13.0.0",
|
||||||
"vite-plugin-lightningcss": "^0.0.5"
|
"svgo": "^3.2.0",
|
||||||
|
"typescript": "^5.3.3"
|
||||||
},
|
},
|
||||||
"lint-staged": {
|
"lint-staged": {
|
||||||
"*": "pnpm run fix:prettier",
|
"*": "pnpm run fix:prettier",
|
||||||
|
@ -73,5 +74,8 @@
|
||||||
},
|
},
|
||||||
"stylelint": {
|
"stylelint": {
|
||||||
"extends": "stylelint-config-standard-scss"
|
"extends": "stylelint-config-standard-scss"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": "^18.17.0 || >= 20.3.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
4190
pnpm-lock.yaml
4190
pnpm-lock.yaml
File diff suppressed because it is too large
Load diff
Reference in a new issue