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 {
|
import {
|
||||||
bookingTerms,
|
bookingTerms,
|
||||||
customerService,
|
customerService,
|
||||||
scandicFriends,
|
|
||||||
privacy,
|
privacy,
|
||||||
|
scandicFriends,
|
||||||
} from "@scandic-hotels/common/constants/routes/customerService"
|
} from "@scandic-hotels/common/constants/routes/customerService"
|
||||||
import { myStay } from "@scandic-hotels/common/constants/routes/myStay"
|
import { myStay } from "@scandic-hotels/common/constants/routes/myStay"
|
||||||
|
|
||||||
|
|||||||
@@ -1,14 +1,14 @@
|
|||||||
[build]
|
[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"
|
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"
|
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]
|
[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]
|
[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]
|
[build.environment]
|
||||||
# set TERM variable for terminal output
|
# set TERM variable for terminal output
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
"extends": ["//"],
|
"extends": ["//"],
|
||||||
"tasks": {
|
"tasks": {
|
||||||
"lint": { "dependsOn": [] },
|
"lint": { "dependsOn": [] },
|
||||||
"build": { "dependsOn": ["clean", "include:shared"] },
|
"build": { "dependsOn": ["clean", "include:shared", "check-types"] },
|
||||||
"dev": { "dependsOn": ["clean", "include:shared"] },
|
"dev": { "dependsOn": ["clean", "include:shared"] },
|
||||||
"test": {
|
"test": {
|
||||||
"dependsOn": [
|
"dependsOn": [
|
||||||
|
|||||||
@@ -18,9 +18,9 @@ import { trpc } from "@scandic-hotels/trpc/client"
|
|||||||
import useLang from "@/hooks/useLang"
|
import useLang from "@/hooks/useLang"
|
||||||
import { isRestaurantOnSiteTierReward } from "@/utils/rewards"
|
import { isRestaurantOnSiteTierReward } from "@/utils/rewards"
|
||||||
|
|
||||||
import { ConfirmClose } from "./ConfirmClose"
|
|
||||||
import RedeemCampaign from "./Flows/Campaign"
|
import RedeemCampaign from "./Flows/Campaign"
|
||||||
import RedeemTier from "./Flows/Tier"
|
import RedeemTier from "./Flows/Tier"
|
||||||
|
import { ConfirmClose } from "./ConfirmClose"
|
||||||
import { RedeemContext } from "./useRedeemFlow"
|
import { RedeemContext } from "./useRedeemFlow"
|
||||||
|
|
||||||
import styles from "./redeem.module.css"
|
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"
|
import type { Hero } from "@scandic-hotels/trpc/types/campaignPage"
|
||||||
|
|
||||||
interface HeroProps
|
interface HeroProps
|
||||||
extends React.HTMLAttributes<HTMLDivElement>,
|
extends
|
||||||
|
React.HTMLAttributes<HTMLDivElement>,
|
||||||
VariantProps<typeof variants>,
|
VariantProps<typeof variants>,
|
||||||
Omit<Hero, "theme"> {
|
Omit<Hero, "theme"> {
|
||||||
pageType?: "campaign" | "overview" | "hotelPage"
|
pageType?: "campaign" | "overview" | "hotelPage"
|
||||||
|
|||||||
@@ -6,6 +6,10 @@ import { useRouter } from "next/navigation"
|
|||||||
import { FormProvider, useForm } from "react-hook-form"
|
import { FormProvider, useForm } from "react-hook-form"
|
||||||
import { useIntl } from "react-intl"
|
import { useIntl } from "react-intl"
|
||||||
|
|
||||||
|
import {
|
||||||
|
privacy,
|
||||||
|
scandicFriends,
|
||||||
|
} from "@scandic-hotels/common/constants/routes/customerService"
|
||||||
import { logger } from "@scandic-hotels/common/logger"
|
import { logger } from "@scandic-hotels/common/logger"
|
||||||
import {
|
import {
|
||||||
formatPhoneNumber,
|
formatPhoneNumber,
|
||||||
@@ -41,10 +45,6 @@ import { requestOpen } from "@/utils/profilingConsent"
|
|||||||
import { trackLinkClick } from "@/utils/tracking/profilingConsent"
|
import { trackLinkClick } from "@/utils/tracking/profilingConsent"
|
||||||
|
|
||||||
import styles from "./form.module.css"
|
import styles from "./form.module.css"
|
||||||
import {
|
|
||||||
privacy,
|
|
||||||
scandicFriends,
|
|
||||||
} from "@scandic-hotels/common/constants/routes/customerService"
|
|
||||||
|
|
||||||
interface SignUpFormProps {
|
interface SignUpFormProps {
|
||||||
title: string
|
title: string
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
"use client"
|
"use client"
|
||||||
|
|
||||||
|
import { cx } from "class-variance-authority"
|
||||||
|
|
||||||
import SkeletonShimmer from "@scandic-hotels/design-system/SkeletonShimmer"
|
import SkeletonShimmer from "@scandic-hotels/design-system/SkeletonShimmer"
|
||||||
import { Typography } from "@scandic-hotels/design-system/Typography"
|
import { Typography } from "@scandic-hotels/design-system/Typography"
|
||||||
|
|
||||||
@@ -17,7 +19,6 @@ import Packages from "./Packages"
|
|||||||
import styles from "./room.module.css"
|
import styles from "./room.module.css"
|
||||||
|
|
||||||
import type { SafeUser } from "@/types/user"
|
import type { SafeUser } from "@/types/user"
|
||||||
import { cx } from "class-variance-authority"
|
|
||||||
|
|
||||||
interface RoomProps {
|
interface RoomProps {
|
||||||
user: SafeUser
|
user: SafeUser
|
||||||
|
|||||||
@@ -1,6 +1,10 @@
|
|||||||
import { useFormContext } from "react-hook-form"
|
import { useFormContext } from "react-hook-form"
|
||||||
import { useIntl } from "react-intl"
|
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 Checkbox from "@scandic-hotels/design-system/Form/Checkbox"
|
||||||
import { ErrorMessage } from "@scandic-hotels/design-system/Form/ErrorMessage"
|
import { ErrorMessage } from "@scandic-hotels/design-system/Form/ErrorMessage"
|
||||||
import { TextLink } from "@scandic-hotels/design-system/TextLink"
|
import { TextLink } from "@scandic-hotels/design-system/TextLink"
|
||||||
@@ -10,10 +14,6 @@ import useLang from "@/hooks/useLang"
|
|||||||
import { getErrorMessage } from "@/utils/getErrorMessage"
|
import { getErrorMessage } from "@/utils/getErrorMessage"
|
||||||
|
|
||||||
import styles from "./termsAndConditions.module.css"
|
import styles from "./termsAndConditions.module.css"
|
||||||
import {
|
|
||||||
bookingTerms,
|
|
||||||
privacy,
|
|
||||||
} from "@scandic-hotels/common/constants/routes/customerService"
|
|
||||||
|
|
||||||
export default function TermsAndConditions() {
|
export default function TermsAndConditions() {
|
||||||
const intl = useIntl()
|
const intl = useIntl()
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
import { useIntl } from "react-intl"
|
import { useIntl } from "react-intl"
|
||||||
|
|
||||||
import { dt } from "@scandic-hotels/common/dt"
|
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 { MaterialIcon } from "@scandic-hotels/design-system/Icons/MaterialIcon"
|
||||||
import Modal from "@scandic-hotels/design-system/Modal"
|
import Modal from "@scandic-hotels/design-system/Modal"
|
||||||
import Link from "@scandic-hotels/design-system/OldDSLink"
|
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 { MaterialIcon } from "@scandic-hotels/design-system/Icons/MaterialIcon"
|
||||||
import Link from "@scandic-hotels/design-system/OldDSLink"
|
import Link from "@scandic-hotels/design-system/OldDSLink"
|
||||||
import Subtitle from "@scandic-hotels/design-system/Subtitle"
|
import Subtitle from "@scandic-hotels/design-system/Subtitle"
|
||||||
@@ -8,7 +9,6 @@ import { getIntl } from "@/i18n"
|
|||||||
import { getLang } from "@/i18n/serverContext"
|
import { getLang } from "@/i18n/serverContext"
|
||||||
|
|
||||||
import styles from "./readMore.module.css"
|
import styles from "./readMore.module.css"
|
||||||
import { scandicFriends } from "@scandic-hotels/common/constants/routes/myPages"
|
|
||||||
|
|
||||||
export default async function ReadMore() {
|
export default async function ReadMore() {
|
||||||
const [intl, lang] = await Promise.all([getIntl(), getLang()])
|
const [intl, lang] = await Promise.all([getIntl(), getLang()])
|
||||||
|
|||||||
@@ -1,14 +1,14 @@
|
|||||||
[build]
|
[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"
|
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"
|
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]
|
[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]
|
[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]]
|
[[plugins]]
|
||||||
package = "@netlify/plugin-nextjs"
|
package = "@netlify/plugin-nextjs"
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
"extends": ["//"],
|
"extends": ["//"],
|
||||||
"tasks": {
|
"tasks": {
|
||||||
"lint": { "dependsOn": [] },
|
"lint": { "dependsOn": [] },
|
||||||
"build": { "dependsOn": ["clean", "include:shared"] },
|
"build": { "dependsOn": ["clean", "include:shared", "check-types"] },
|
||||||
"dev": { "dependsOn": ["clean", "include:shared"] },
|
"dev": { "dependsOn": ["clean", "include:shared"] },
|
||||||
"test": {
|
"test": {
|
||||||
"dependsOn": [
|
"dependsOn": [
|
||||||
|
|||||||
@@ -3,8 +3,6 @@
|
|||||||
"packageManager": "yarn@4.6.0",
|
"packageManager": "yarn@4.6.0",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "turbo run build --env-mode=loose",
|
"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",
|
"lint": "turbo run lint",
|
||||||
"dev": "turbo run dev --output-logs new-only",
|
"dev": "turbo run dev --output-logs new-only",
|
||||||
"dev:web": "turbo run dev --filter=@scandic-hotels/scandic-web --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 { cva } from 'class-variance-authority'
|
||||||
|
|
||||||
|
|
||||||
import { deepmerge } from 'deepmerge-ts'
|
import { deepmerge } from 'deepmerge-ts'
|
||||||
import styles from './button.module.css'
|
import styles from './button.module.css'
|
||||||
|
|
||||||
|
|||||||
@@ -217,8 +217,6 @@
|
|||||||
"test": "vitest run --passWithNoTests",
|
"test": "vitest run --passWithNoTests",
|
||||||
"test:s": "vitest --project=storybook",
|
"test:s": "vitest --project=storybook",
|
||||||
"test:watch": "vitest",
|
"test:watch": "vitest",
|
||||||
"prepack": "yarn run build",
|
|
||||||
"prepare": "husky && yarn run build",
|
|
||||||
"check-types": "tsgo --noEmit",
|
"check-types": "tsgo --noEmit",
|
||||||
"test:browser": "vitest --config=vitest.browser.config.ts",
|
"test:browser": "vitest --config=vitest.browser.config.ts",
|
||||||
"include:shared": "jiti ../../scripts/copyFiles.ts ../../shared public/_static/shared"
|
"include:shared": "jiti ../../scripts/copyFiles.ts ../../shared public/_static/shared"
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
"extends": ["//"],
|
"extends": ["//"],
|
||||||
"tasks": {
|
"tasks": {
|
||||||
"build": {
|
"build": {
|
||||||
"dependsOn": ["include:shared"],
|
"dependsOn": ["include:shared", "check-types"],
|
||||||
"outputs": ["dist/**"]
|
"outputs": ["dist/**"]
|
||||||
},
|
},
|
||||||
"dev": {
|
"dev": {
|
||||||
|
|||||||
@@ -24,8 +24,9 @@ export interface TableBlock extends z.output<typeof tableSchema> {}
|
|||||||
export type TableData = TableBlock["table"]
|
export type TableData = TableBlock["table"]
|
||||||
export interface TextCols extends z.output<typeof textColsSchema> {}
|
export interface TextCols extends z.output<typeof textColsSchema> {}
|
||||||
export interface UspGrid extends z.output<typeof uspGridSchema> {}
|
export interface UspGrid extends z.output<typeof uspGridSchema> {}
|
||||||
interface GetHotelListing
|
interface GetHotelListing extends z.output<
|
||||||
extends z.output<typeof contentPageHotelListingSchema> {}
|
typeof contentPageHotelListingSchema
|
||||||
|
> {}
|
||||||
export type HotelListing = GetHotelListing["hotel_listing"]
|
export type HotelListing = GetHotelListing["hotel_listing"]
|
||||||
export interface CarouselCards extends z.output<typeof carouselCardsSchema> {}
|
export interface CarouselCards extends z.output<typeof carouselCardsSchema> {}
|
||||||
export interface CardGallery extends z.output<typeof cardGallerySchema> {}
|
export interface CardGallery extends z.output<typeof cardGallerySchema> {}
|
||||||
|
|||||||
@@ -6,14 +6,17 @@ import type {
|
|||||||
collectionPageSchema,
|
collectionPageSchema,
|
||||||
} from "../routers/contentstack/collectionPage/output"
|
} from "../routers/contentstack/collectionPage/output"
|
||||||
|
|
||||||
export interface GetCollectionPageRefsSchema
|
export interface GetCollectionPageRefsSchema extends z.input<
|
||||||
extends z.input<typeof collectionPageRefsSchema> {}
|
typeof collectionPageRefsSchema
|
||||||
|
> {}
|
||||||
|
|
||||||
export interface CollectionPageRefs
|
export interface CollectionPageRefs extends z.output<
|
||||||
extends z.output<typeof collectionPageRefsSchema> {}
|
typeof collectionPageRefsSchema
|
||||||
|
> {}
|
||||||
|
|
||||||
export interface GetCollectionPageSchema
|
export interface GetCollectionPageSchema extends z.input<
|
||||||
extends z.input<typeof collectionPageSchema> {}
|
typeof collectionPageSchema
|
||||||
|
> {}
|
||||||
|
|
||||||
export interface CollectionPage extends z.output<typeof collectionPageSchema> {}
|
export interface CollectionPage extends z.output<typeof collectionPageSchema> {}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user