Skip to content

Commit

Permalink
feat: upgrade to Astro 3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
manuelschroederdev committed Aug 31, 2023
1 parent 71da7e9 commit a5b9ae9
Show file tree
Hide file tree
Showing 15 changed files with 7,230 additions and 3,600 deletions.
10 changes: 5 additions & 5 deletions lib/cypress/e2e/index.cy.js
Expand Up @@ -7,11 +7,11 @@ Tests:

describe("@storyblok/astro", () => {
it("is loaded", () => {
cy.visit("http://localhost:3000/");
cy.visit("http://localhost:4321/");
cy.get("#storyblok-javascript-bridge").should("exist");
});
it("storyblokEditable adds correct attributes", () => {
cy.visit("http://localhost:3000/");
cy.visit("http://localhost:4321/");
cy.get("[data-test=page-component]").should(
"have.attr",
"data-blok-uid",
Expand All @@ -24,15 +24,15 @@ describe("@storyblok/astro", () => {
);
});
it("globally registered feature component is loaded correctly", () => {
cy.visit("http://localhost:3000/");
cy.visit("http://localhost:4321/");
cy.get("[data-test=feature-component]").should("exist");
});
it("Custom FallbackComponent is loaded correctly", () => {
cy.visit("http://localhost:3000/");
cy.visit("http://localhost:4321/");
cy.get("[data-test=custom-fallback-component]").should("exist");
});
it("RichText Renderer renders embedded bloks correctly", () => {
cy.visit("http://localhost:3000/");
cy.visit("http://localhost:4321/");
cy.get("[data-test=embedded-blok]").should("exist");
});
/*describe("Bridge", () => {
Expand Down
2 changes: 1 addition & 1 deletion lib/index.ts
Expand Up @@ -4,7 +4,6 @@ import { vitePluginStoryblokOptions } from "./vite-plugin-storyblok-options";
import {
RichTextResolver,
renderRichText as origRenderRichText,
StoryblokClient,
} from "@storyblok/js";

import type { AstroIntegration } from "astro";
Expand All @@ -13,6 +12,7 @@ import type {
ISbRichtext,
SbRichTextOptions,
StoryblokBridgeConfigV2,
StoryblokClient,
} from "./types";

export {
Expand Down
20 changes: 10 additions & 10 deletions lib/package.json
Expand Up @@ -25,28 +25,28 @@
"dev": "vite build --watch",
"build": "vite build",
"test": "npm run test:e2e",
"test:e2e": "start-server-and-test cy:playground http-get://localhost:3000/ cy:run",
"test:e2e-watch": "start-server-and-test cy:playground http-get://localhost:3000/ cy:open",
"test:e2e": "start-server-and-test cy:playground http-get://localhost:4321/ cy:run",
"test:e2e-watch": "start-server-and-test cy:playground http-get://localhost:4321/ cy:open",
"cy:playground": "npm run dev --prefix ../playground-test",
"cy:run": "cypress run",
"cy:open": "cypress open",
"prepublishOnly": "npm run build && cp ../README.md ./"
},
"dependencies": {
"@storyblok/js": "^2.2.12",
"@storyblok/js": "^2.3.0",
"camelcase": "^8.0.0"
},
"devDependencies": {
"@cypress/vite-dev-server": "^5.0.5",
"@cypress/vite-dev-server": "^5.0.6",
"@rollup/plugin-dynamic-import-vars": "^2.0.5",
"@types/node": "20.5.4",
"astro": "2.10.13",
"cypress": "^12.17.4",
"@types/node": "20.5.7",
"astro": "^3.0.3",
"cypress": "^13.0.0",
"eslint-plugin-cypress": "^2.14.0",
"start-server-and-test": "^2.0.0",
"typescript": "5.1.6",
"typescript": "5.2.2",
"vite": "^4.4.9",
"vite-plugin-dts": "^3.5.2"
"vite-plugin-dts": "^3.5.3"
},
"repository": {
"type": "git",
Expand All @@ -70,4 +70,4 @@
"publishConfig": {
"access": "public"
}
}
}
4 changes: 3 additions & 1 deletion lib/tsconfig.json
Expand Up @@ -2,7 +2,9 @@
"compilerOptions": {
"module": "ESNext",
"target": "ESNext",
"strict": false
"strict": false,
"baseUrl": ".",
"moduleResolution": "Node" // temporary until https://github.com/cypress-io/cypress/issues/26308 is fixed
},
"extends": "astro/tsconfigs/base",
"$schema": "https://json.schemastore.org/tsconfig",
Expand Down

0 comments on commit a5b9ae9

Please sign in to comment.