Skip to content

Commit

Permalink
Update to support ^1.0.0-rc.0
Browse files Browse the repository at this point in the history
J=SLAP-2892
TEST=auto,manual

Auto tests pass.

Can run studio with npm run dev using
^1.0.0-rc.0 after modification.

yext/pages@4cf67c9

Note that this change requires this update in PagesJS, so will
either need to update locally or wait until the next PagesJS
release.
  • Loading branch information
jwartofsky-yext committed Aug 18, 2023
1 parent 55aa516 commit fcbd0c5
Show file tree
Hide file tree
Showing 23 changed files with 21 additions and 22 deletions.
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ export const config: TemplateConfig = {
// The entity language profiles that documents will be generated for.
localization: {
locales: ["en"],
primary: false,
},
},
};
Expand Down
2 changes: 1 addition & 1 deletion apps/test-site/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"@typescript-eslint/parser": "^5.16.0",
"@yext/eslint-config": "^1.0.0",
"@yext/eslint-plugin-export-star": "^1.0.2",
"@yext/pages": "^1.0.0-beta.26",
"@yext/pages": "^1.0.0-rc.0",
"@yext/studio": "*",
"@yext/types": "^0.1.12-alpha",
"eslint": "^8.11.0",
Expand Down
2 changes: 1 addition & 1 deletion apps/test-site/src/templates/LocationPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import ProminentImage from "../components/ProminentImage";
export const config: TemplateConfig = {
stream: {
$id: "studio-stream-id-LocationPage",
localization: { locales: ["en"], primary: false },
localization: { locales: ["en"] },
filter: { entityTypes: ["location"] },
fields: ["address", "hours", "slug"],
},
Expand Down
2 changes: 1 addition & 1 deletion apps/test-site/src/templates/UniversalPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import FixedText from "../components/FixedText";
export const config: TemplateConfig = {
stream: {
$id: "studio-stream-id-UniversalPage",
localization: { locales: ["en"], primary: false },
localization: { locales: ["en"] },
filter: { entityTypes: ["location"] },
fields: ["services", "address", "hours", "slug"],
},
Expand Down
2 changes: 1 addition & 1 deletion e2e-tests/src/templates/LocationPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import HoursDisplay from "../components/HoursDisplay";
export const config: TemplateConfig = {
stream: {
$id: "studio-stream-id-LocationPage",
localization: { locales: ["en"], primary: false },
localization: { locales: ["en"] },
filter: { entityTypes: ["location"] },
fields: ["address", "hours", "slug"],
},
Expand Down
2 changes: 1 addition & 1 deletion e2e-tests/tests/__fixtures__/add-element-expected-page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import HoursDisplay from "../components/HoursDisplay";
export const config: TemplateConfig = {
stream: {
$id: "studio-stream-id-LocationPage",
localization: { locales: ["en"], primary: false },
localization: { locales: ["en"] },
filter: { entityTypes: ["location"] },
fields: ["address", "hours", "slug"],
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { GetPath, TemplateConfig, TemplateProps } from "@yext/pages";
export const config: TemplateConfig = {
stream: {
$id: "studio-stream-id-EntityPage",
localization: { locales: ["en"], primary: false },
localization: { locales: ["en"] },
filter: {
entityTypes: ["entity1"],
savedFilterIds: ["entity2", "entity3"],
Expand Down
2 changes: 1 addition & 1 deletion packages/studio-plugin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"@babel/preset-env": "^7.22.4",
"@babel/preset-react": "^7.22.3",
"@babel/preset-typescript": "^7.21.5",
"@yext/pages": "^1.0.0-beta.14",
"@yext/pages": "^1.0.0-rc.0",
"camelcase": "^7.0.1",
"chokidar": "^3.5.3",
"colors": "^1.4.0",
Expand Down
1 change: 0 additions & 1 deletion packages/studio-plugin/src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,4 @@ export const PAGESJS_TEMPLATE_PROPS_TYPE = "TemplateProps";
export const STUDIO_PROCESS_ARGS_OBJ = "YEXT_STUDIO_ARGS";
export const STREAM_LOCALIZATION: Stream["localization"] = {
locales: ["en"],
primary: false,
};
2 changes: 1 addition & 1 deletion packages/studio-plugin/src/startPagesDevelopmentServer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { spawn } from "node:child_process";
export const startPagesDevelopmentServer = async () => {
const pagesServer = spawn(
"npx",
["pages", "dev", "--open-browser=false", "--local"],
["pages", "dev", "--no-open-browser", "--local", "--noInit"],
{
stdio: ["pipe", "pipe", "pipe"],
env: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { GetPath, TemplateConfig, TemplateProps } from "@yext/pages";
export const config: TemplateConfig = {
stream: {
$id: "studio-stream-id",
localization: { locales: ["en"], primary: false },
localization: { locales: ["en"] },
filter: { entityTypes: ["location"] },
fields: ["title", "slug"],
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { TemplateConfig, TemplateProps } from "@yext/pages";
export const config: TemplateConfig = {
stream: {
$id: "studio-stream-id-test",
localization: { locales: ["en"], primary: false },
localization: { locales: ["en"] },
filter: {},
fields: ["slug"],
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { GetPath, TemplateConfig, TemplateProps } from "@yext/pages";
export const config: TemplateConfig = {
stream: {
$id: "studio-stream-id-test",
localization: { locales: ["en"], primary: false },
localization: { locales: ["en"] },
filter: {},
fields: ["slug"],
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { TemplateConfig, TemplateProps } from "@yext/pages";
export const config: TemplateConfig = {
stream: {
$id: "studio-stream-id-test",
localization: { locales: ["en"], primary: false },
localization: { locales: ["en"] },
filter: {},
fields: ["name"],
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import ComplexBanner from "../../ComponentFile/ComplexBanner";
export const config: TemplateConfig = {
stream: {
$id: "studio-stream-id-test",
localization: { locales: ["en"], primary: false },
localization: { locales: ["en"] },
filter: {},
fields: ["title", "city", "services"],
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import ComplexBanner from "../../ComponentFile/ComplexBanner";
export const config: TemplateConfig = {
stream: {
$id: "studio-stream-id-test",
localization: { locales: ["en"], primary: false },
localization: { locales: ["en"] },
filter: { entityTypes: ["product"] },
fields: ["title"],
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import ComplexBanner from "../../ComponentFile/ComplexBanner";
export const config: TemplateConfig = {
stream: {
$id: "studio-stream-id-test",
localization: { locales: ["en"], primary: false },
localization: { locales: ["en"] },
filter: {},
fields: ["slug"],
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import ComplexBanner from "../../ComponentFile/ComplexBanner";
export const config: TemplateConfig = {
stream: {
$id: "studio-stream-id-test",
localization: { locales: ["en"], primary: false },
localization: { locales: ["en"] },
filter: { entityTypes: ["location"] },
fields: ["title"],
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import ComplexBanner from "../../ComponentFile/ComplexBanner";
export const config: TemplateConfig = {
stream: {
$id: "studio-stream-id-test",
localization: { locales: ["en"], primary: false },
localization: { locales: ["en"] },
filter: {},
fields: ["arrayIndex", "objectField"],
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import ComplexBanner from "../../ComponentFile/ComplexBanner";
export const config: TemplateConfig = {
stream: {
$id: "studio-stream-id-test",
localization: { locales: ["en"], primary: false },
localization: { locales: ["en"] },
filter: {},
fields: [
"title",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import ComplexBanner from "../../ComponentFile/ComplexBanner";
export const config: TemplateConfig = {
stream: {
$id: "studio-stream-id-test",
localization: { locales: ["en"], primary: false },
localization: { locales: ["en"] },
filter: {},
fields: ["title", "slug"],
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import NestedModule from "../modules/a/b/NestedModule";
export const config: TemplateConfig = {
stream: {
$id: "studio-stream-id",
localization: { locales: ["en"], primary: false },
localization: { locales: ["en"] },
filter: {},
fields: ["slug"],
},
Expand Down
1 change: 1 addition & 0 deletions packages/studio/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
"@testing-library/react": "^13.4.0",
"@testing-library/user-event": "^14.4.3",
"@types/jest": "^29.2.4",
"@yext/pages": "^1.0.0-rc.0",
"@types/lodash": "^4.14.191",
"@types/node": "^18.11.15",
"@types/path-browserify": "^1.0.0",
Expand Down

0 comments on commit fcbd0c5

Please sign in to comment.