Merged in chore/check-types-before-build (pull request #3326)
chore: check types before build * chore: check types before build * remove unused package.json scripts * merge Approved-by: Linus Flood
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
import {
|
||||
bookingTerms,
|
||||
customerService,
|
||||
scandicFriends,
|
||||
privacy,
|
||||
scandicFriends,
|
||||
} from "@scandic-hotels/common/constants/routes/customerService"
|
||||
import { myStay } from "@scandic-hotels/common/constants/routes/myStay"
|
||||
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
[build]
|
||||
command = "export NEXT_PUBLIC_RELEASE_TAG=$(git tag -l 'release-v*' | sort -V | tail -n 1) && yarn test --filter=@scandic-hotels/partner-sas && yarn build:sas"
|
||||
command = "export NEXT_PUBLIC_RELEASE_TAG=$(git tag -l 'v*' | sort -V | tail -n 1) && yarn test --filter=@scandic-hotels/partner-sas && yarn build --filter=@scandic-hotels/partner-sas"
|
||||
publish = "apps/partner-sas/.next"
|
||||
|
||||
ignore = "if [ -z ${CACHED_COMMIT_REF+x} ] ; then echo 'no CACHED_COMMIT_REF found' && false ; else git diff --quiet $CACHED_COMMIT_REF $COMMIT_REF apps/partner-sas packages/booking-flow packages/common packages/trpc packages/design-system packages/typescript-config ; fi"
|
||||
|
||||
[context.branch-deploy]
|
||||
command = "export NEXT_PUBLIC_RELEASE_TAG=$(git tag -l 'release-v*' | sort -V | tail -n 1) && yarn test --filter=@scandic-hotels/partner-sas && yarn build:sas"
|
||||
command = "export NEXT_PUBLIC_RELEASE_TAG=$(git tag -l 'v*' | sort -V | tail -n 1) && yarn test --filter=@scandic-hotels/partner-sas && yarn build --filter=@scandic-hotels/partner-sas"
|
||||
|
||||
[context.deploy-preview]
|
||||
command = "export NEXT_PUBLIC_RELEASE_TAG=$(git tag -l 'release-v*' | sort -V | tail -n 1) && yarn test --filter=@scandic-hotels/partner-sas && yarn build:sas"
|
||||
command = "export NEXT_PUBLIC_RELEASE_TAG=$(git tag -l 'v*' | sort -V | tail -n 1) && yarn test --filter=@scandic-hotels/partner-sas && yarn build --filter=@scandic-hotels/partner-sas"
|
||||
|
||||
[build.environment]
|
||||
# set TERM variable for terminal output
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
"extends": ["//"],
|
||||
"tasks": {
|
||||
"lint": { "dependsOn": [] },
|
||||
"build": { "dependsOn": ["clean", "include:shared"] },
|
||||
"build": { "dependsOn": ["clean", "include:shared", "check-types"] },
|
||||
"dev": { "dependsOn": ["clean", "include:shared"] },
|
||||
"test": {
|
||||
"dependsOn": [
|
||||
|
||||
@@ -18,9 +18,9 @@ import { trpc } from "@scandic-hotels/trpc/client"
|
||||
import useLang from "@/hooks/useLang"
|
||||
import { isRestaurantOnSiteTierReward } from "@/utils/rewards"
|
||||
|
||||
import { ConfirmClose } from "./ConfirmClose"
|
||||
import RedeemCampaign from "./Flows/Campaign"
|
||||
import RedeemTier from "./Flows/Tier"
|
||||
import { ConfirmClose } from "./ConfirmClose"
|
||||
import { RedeemContext } from "./useRedeemFlow"
|
||||
|
||||
import styles from "./redeem.module.css"
|
||||
|
||||
@@ -16,7 +16,8 @@ import styles from "./hero.module.css"
|
||||
import type { Hero } from "@scandic-hotels/trpc/types/campaignPage"
|
||||
|
||||
interface HeroProps
|
||||
extends React.HTMLAttributes<HTMLDivElement>,
|
||||
extends
|
||||
React.HTMLAttributes<HTMLDivElement>,
|
||||
VariantProps<typeof variants>,
|
||||
Omit<Hero, "theme"> {
|
||||
pageType?: "campaign" | "overview" | "hotelPage"
|
||||
|
||||
@@ -6,6 +6,10 @@ import { useRouter } from "next/navigation"
|
||||
import { FormProvider, useForm } from "react-hook-form"
|
||||
import { useIntl } from "react-intl"
|
||||
|
||||
import {
|
||||
privacy,
|
||||
scandicFriends,
|
||||
} from "@scandic-hotels/common/constants/routes/customerService"
|
||||
import { logger } from "@scandic-hotels/common/logger"
|
||||
import {
|
||||
formatPhoneNumber,
|
||||
@@ -41,10 +45,6 @@ import { requestOpen } from "@/utils/profilingConsent"
|
||||
import { trackLinkClick } from "@/utils/tracking/profilingConsent"
|
||||
|
||||
import styles from "./form.module.css"
|
||||
import {
|
||||
privacy,
|
||||
scandicFriends,
|
||||
} from "@scandic-hotels/common/constants/routes/customerService"
|
||||
|
||||
interface SignUpFormProps {
|
||||
title: string
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
"use client"
|
||||
|
||||
import { cx } from "class-variance-authority"
|
||||
|
||||
import SkeletonShimmer from "@scandic-hotels/design-system/SkeletonShimmer"
|
||||
import { Typography } from "@scandic-hotels/design-system/Typography"
|
||||
|
||||
@@ -17,7 +19,6 @@ import Packages from "./Packages"
|
||||
import styles from "./room.module.css"
|
||||
|
||||
import type { SafeUser } from "@/types/user"
|
||||
import { cx } from "class-variance-authority"
|
||||
|
||||
interface RoomProps {
|
||||
user: SafeUser
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
import { useFormContext } from "react-hook-form"
|
||||
import { useIntl } from "react-intl"
|
||||
|
||||
import {
|
||||
bookingTerms,
|
||||
privacy,
|
||||
} from "@scandic-hotels/common/constants/routes/customerService"
|
||||
import Checkbox from "@scandic-hotels/design-system/Form/Checkbox"
|
||||
import { ErrorMessage } from "@scandic-hotels/design-system/Form/ErrorMessage"
|
||||
import { TextLink } from "@scandic-hotels/design-system/TextLink"
|
||||
@@ -10,10 +14,6 @@ import useLang from "@/hooks/useLang"
|
||||
import { getErrorMessage } from "@/utils/getErrorMessage"
|
||||
|
||||
import styles from "./termsAndConditions.module.css"
|
||||
import {
|
||||
bookingTerms,
|
||||
privacy,
|
||||
} from "@scandic-hotels/common/constants/routes/customerService"
|
||||
|
||||
export default function TermsAndConditions() {
|
||||
const intl = useIntl()
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
import { useIntl } from "react-intl"
|
||||
|
||||
import { dt } from "@scandic-hotels/common/dt"
|
||||
import { IconButton } from "@scandic-hotels/design-system/IconButton"; // client only
|
||||
import { IconButton } from "@scandic-hotels/design-system/IconButton" // client only
|
||||
import { MaterialIcon } from "@scandic-hotels/design-system/Icons/MaterialIcon"
|
||||
import Modal from "@scandic-hotels/design-system/Modal"
|
||||
import Link from "@scandic-hotels/design-system/OldDSLink"
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import { scandicFriends } from "@scandic-hotels/common/constants/routes/myPages"
|
||||
import { MaterialIcon } from "@scandic-hotels/design-system/Icons/MaterialIcon"
|
||||
import Link from "@scandic-hotels/design-system/OldDSLink"
|
||||
import Subtitle from "@scandic-hotels/design-system/Subtitle"
|
||||
@@ -8,7 +9,6 @@ import { getIntl } from "@/i18n"
|
||||
import { getLang } from "@/i18n/serverContext"
|
||||
|
||||
import styles from "./readMore.module.css"
|
||||
import { scandicFriends } from "@scandic-hotels/common/constants/routes/myPages"
|
||||
|
||||
export default async function ReadMore() {
|
||||
const [intl, lang] = await Promise.all([getIntl(), getLang()])
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
[build]
|
||||
command = "export NEXT_PUBLIC_RELEASE_TAG=$(git tag -l 'release-v*' | sort -V | tail -n 1) && yarn test --filter=@scandic-hotels/scandic-web && yarn build:web"
|
||||
command = "export NEXT_PUBLIC_RELEASE_TAG=$(git tag -l 'v*' | sort -V | tail -n 1) && yarn test --filter=@scandic-hotels/scandic-web && yarn build --filter=@scandic-hotels/scandic-web"
|
||||
publish = "apps/scandic-web/.next"
|
||||
|
||||
ignore = "if [ -z ${CACHED_COMMIT_REF+x} ] ; then echo 'no CACHED_COMMIT_REF found' && false ; else git diff --quiet $CACHED_COMMIT_REF $COMMIT_REF apps/scandic-web packages/booking-flow packages/common packages/trpc packages/design-system packages/typescript-config ; fi"
|
||||
|
||||
[context.branch-deploy]
|
||||
command = "export NEXT_PUBLIC_RELEASE_TAG=$(git tag -l 'release-v*' | sort -V | tail -n 1) && yarn test --filter=@scandic-hotels/scandic-web && yarn build:web"
|
||||
command = "export NEXT_PUBLIC_RELEASE_TAG=$(git tag -l 'v*' | sort -V | tail -n 1) && yarn test --filter=@scandic-hotels/scandic-web && yarn build --filter=@scandic-hotels/scandic-web"
|
||||
|
||||
[context.deploy-preview]
|
||||
command = "export NEXT_PUBLIC_RELEASE_TAG=$(git tag -l 'release-v*' | sort -V | tail -n 1) && yarn test --filter=@scandic-hotels/scandic-web && yarn build:web"
|
||||
command = "export NEXT_PUBLIC_RELEASE_TAG=$(git tag -l 'v*' | sort -V | tail -n 1) && yarn test --filter=@scandic-hotels/scandic-web && yarn build --filter=@scandic-hotels/scandic-web"
|
||||
|
||||
[[plugins]]
|
||||
package = "@netlify/plugin-nextjs"
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
"extends": ["//"],
|
||||
"tasks": {
|
||||
"lint": { "dependsOn": [] },
|
||||
"build": { "dependsOn": ["clean", "include:shared"] },
|
||||
"build": { "dependsOn": ["clean", "include:shared", "check-types"] },
|
||||
"dev": { "dependsOn": ["clean", "include:shared"] },
|
||||
"test": {
|
||||
"dependsOn": [
|
||||
|
||||
@@ -3,8 +3,6 @@
|
||||
"packageManager": "yarn@4.6.0",
|
||||
"scripts": {
|
||||
"build": "turbo run build --env-mode=loose",
|
||||
"build:web": "turbo run build --filter=@scandic-hotels/scandic-web --env-mode=loose",
|
||||
"build:sas": "turbo run build --filter=@scandic-hotels/partner-sas --env-mode=loose",
|
||||
"lint": "turbo run lint",
|
||||
"dev": "turbo run dev --output-logs new-only",
|
||||
"dev:web": "turbo run dev --filter=@scandic-hotels/scandic-web --output-logs new-only",
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import { cva } from 'class-variance-authority'
|
||||
|
||||
|
||||
import { deepmerge } from 'deepmerge-ts'
|
||||
import styles from './button.module.css'
|
||||
|
||||
|
||||
@@ -217,8 +217,6 @@
|
||||
"test": "vitest run --passWithNoTests",
|
||||
"test:s": "vitest --project=storybook",
|
||||
"test:watch": "vitest",
|
||||
"prepack": "yarn run build",
|
||||
"prepare": "husky && yarn run build",
|
||||
"check-types": "tsgo --noEmit",
|
||||
"test:browser": "vitest --config=vitest.browser.config.ts",
|
||||
"include:shared": "jiti ../../scripts/copyFiles.ts ../../shared public/_static/shared"
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
"extends": ["//"],
|
||||
"tasks": {
|
||||
"build": {
|
||||
"dependsOn": ["include:shared"],
|
||||
"dependsOn": ["include:shared", "check-types"],
|
||||
"outputs": ["dist/**"]
|
||||
},
|
||||
"dev": {
|
||||
|
||||
@@ -24,8 +24,9 @@ export interface TableBlock extends z.output<typeof tableSchema> {}
|
||||
export type TableData = TableBlock["table"]
|
||||
export interface TextCols extends z.output<typeof textColsSchema> {}
|
||||
export interface UspGrid extends z.output<typeof uspGridSchema> {}
|
||||
interface GetHotelListing
|
||||
extends z.output<typeof contentPageHotelListingSchema> {}
|
||||
interface GetHotelListing extends z.output<
|
||||
typeof contentPageHotelListingSchema
|
||||
> {}
|
||||
export type HotelListing = GetHotelListing["hotel_listing"]
|
||||
export interface CarouselCards extends z.output<typeof carouselCardsSchema> {}
|
||||
export interface CardGallery extends z.output<typeof cardGallerySchema> {}
|
||||
|
||||
@@ -6,14 +6,17 @@ import type {
|
||||
collectionPageSchema,
|
||||
} from "../routers/contentstack/collectionPage/output"
|
||||
|
||||
export interface GetCollectionPageRefsSchema
|
||||
extends z.input<typeof collectionPageRefsSchema> {}
|
||||
export interface GetCollectionPageRefsSchema extends z.input<
|
||||
typeof collectionPageRefsSchema
|
||||
> {}
|
||||
|
||||
export interface CollectionPageRefs
|
||||
extends z.output<typeof collectionPageRefsSchema> {}
|
||||
export interface CollectionPageRefs extends z.output<
|
||||
typeof collectionPageRefsSchema
|
||||
> {}
|
||||
|
||||
export interface GetCollectionPageSchema
|
||||
extends z.input<typeof collectionPageSchema> {}
|
||||
export interface GetCollectionPageSchema extends z.input<
|
||||
typeof collectionPageSchema
|
||||
> {}
|
||||
|
||||
export interface CollectionPage extends z.output<typeof collectionPageSchema> {}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user