Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: upgrade Astro to v4, vite v5 and storyblok/astro v4 #94

Merged
merged 1 commit into from
Dec 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions demo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
"try": "npm run build & npm run preview"
},
"dependencies": {
"@storyblok/astro": "^3.0.1",
"astro": "^3.2.3"
"@storyblok/astro": "^4.0.0",
"astro": "^4.0.6"
},
"stackblitz": {
"startCommand": "npm run start-stackblitz"
Expand Down
13 changes: 10 additions & 3 deletions demo/src/layouts/Layout.astro
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export interface Props {
const { title } = Astro.props;
---

<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
Expand All @@ -25,7 +25,14 @@ const { title } = Astro.props;
background-color: #f6f6f6;
}
code {
font-family: Menlo, Monaco, Lucida Console, Liberation Mono,
DejaVu Sans Mono, Bitstream Vera Sans Mono, Courier New, monospace;
font-family:
Menlo,
Monaco,
Lucida Console,
Liberation Mono,
DejaVu Sans Mono,
Bitstream Vera Sans Mono,
Courier New,
monospace;
}
</style>
18 changes: 11 additions & 7 deletions lib/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
},
"license": "MIT",
"author": "Edvinas Jurele",
"type": "module",
"exports": {
".": {
"import": "./dist/index.mjs",
Expand All @@ -42,7 +43,7 @@
"build": "vite build",
"dev": "vite build --watch",
"prepublishOnly": "npm run build && cp ../README.md ./",
"test": "npm run test:unit && npm run lint && npm run ts:check",
"test": "npm run test:unit && npm run ts:check",
"test:unit": "vitest run",
"test:watch": "vitest watch",
"ts:check": "tsc"
Expand All @@ -52,16 +53,19 @@
"@semantic-release/git": "^10.0.1",
"@semantic-release/github": "^9.0.3",
"@semantic-release/npm": "^10.0.4",
"@storyblok/js": "^2.1.3",
"astro": "^2.7.0",
"@storyblok/js": "^3.0.0",
"astro": "^4.0.6",
"semantic-release": "^21.1.1",
"vite": "^4.3.1",
"vite-plugin-dts": "^2.3.0"
"vite": "^5.0.10",
"vite-plugin-dts": "^3.6.4"
},
"publishConfig": {
"access": "public"
"peerDependencies": {
"astro": "^3.0.0 || ^4.0.0"
},
"volta": {
"node": "18.12.1"
},
"publishConfig": {
"access": "public"
}
}
2 changes: 1 addition & 1 deletion lib/src/utils/resolveRichTextToNodes.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -848,7 +848,7 @@ describe("resolveMark", () => {
blue: "this-is-blue",
red: "this-is-red",
pink: "this-is-pink",
}[color]);
})[color];

return {
props: {
Expand Down
2 changes: 1 addition & 1 deletion lib/src/utils/resolveRichTextToNodes.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {
import type {
ComponentNode,
Mark,
Options,
Expand Down
2 changes: 1 addition & 1 deletion lib/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@
"extends": "astro/tsconfigs/base",
"$schema": "https://json.schemastore.org/tsconfig",
"include": ["./*.astro", "./**/*.ts"],
"exclude": ["node_modules/*", "./vite-plugin-*.ts", "dist"]
"exclude": ["node_modules/*", "./vite*.ts", "dist"]
}
1 change: 0 additions & 1 deletion lib/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ export default defineConfig(() => {
plugins: [
dts({
outputDir: "dist/types",
skipDiagnostics: false,
}) as unknown as Plugin,
],
};
Expand Down
Loading