diff --git a/.github/workflows/label.yml b/.github/workflows/label.yml index b24c72a1..d9326dd4 100644 --- a/.github/workflows/label.yml +++ b/.github/workflows/label.yml @@ -1,5 +1,6 @@ # this auto labels PRs based on the configuration file # have a look at ./github/labeler.yml` +name: CI on: - pull_request_target @@ -17,4 +18,3 @@ jobs: with: repo-token: "${{ secrets.GITHUB_TOKEN }}" sync-labels: true - configuration-path: ./github/labeler.yml diff --git a/packages/env/index.ts b/packages/env/index.ts index fdb4b588..868dcda4 100644 --- a/packages/env/index.ts +++ b/packages/env/index.ts @@ -5,6 +5,8 @@ import { createEnv } from "@ashgw/ts-env"; config({ path: require("path").resolve(__dirname, "../../.env") }); +const isBrowser = typeof window !== "undefined"; + export const env = createEnv({ vars: { NODE_ENV: z.enum(["production", "development", "preview"]), @@ -15,6 +17,5 @@ export const env = createEnv({ }, disablePrefix: ["NODE_ENV"], prefix: "NEXT_PUBLIC", - // @ts-expect-error skip in browser - skipValidation: typeof window === "undefined" ? false : true, + skipValidation: isBrowser, }); diff --git a/packages/env/tsconfig.json b/packages/env/tsconfig.json index 99fa424f..9a946ec1 100644 --- a/packages/env/tsconfig.json +++ b/packages/env/tsconfig.json @@ -1,5 +1,6 @@ { "extends": "@ashgw/tsconfig/base.json", "include": ["."], + "compilerOptions": { "lib": ["DOM", "ES2022"] }, "exclude": ["node_modules"] }