@pexip-engage-public/plugin-state
Advanced tools
Comparing version 1.2.0 to 2.0.0-canary-20231013111621
# @pexip-engage-public/plugin-state | ||
## 2.0.0-canary-20231013111621 | ||
### Major Changes | ||
- f94a30b50: feat: switch plugin packages to native node esm only | ||
## 1.2.0 | ||
@@ -4,0 +10,0 @@ |
{ | ||
"name": "@pexip-engage-public/plugin-state", | ||
"version": "1.2.0", | ||
"version": "2.0.0-canary-20231013111621", | ||
"homepage": "https://github.com/skedify/frontend-mono/tree/develop/apps/plugin-remix/packages/plugin-state#readme", | ||
@@ -20,14 +20,11 @@ "bugs": { | ||
"sideEffects": false, | ||
"type": "module", | ||
"exports": { | ||
".": { | ||
"types": "./typings/index.d.ts", | ||
"import": "./dist/index.mjs" | ||
"import": "./dist/index.js" | ||
} | ||
}, | ||
"module": "./dist/index.mjs", | ||
"types": "./typings/index.d.ts", | ||
"files": [ | ||
"dist", | ||
"CHANGELOG.md", | ||
"typings", | ||
"src" | ||
@@ -39,6 +36,6 @@ ], | ||
"devDependencies": { | ||
"@eslint/eslintrc": "^2.1.2", | ||
"@total-typescript/ts-reset": "^0.5.1", | ||
"tsup": "^7.2.0", | ||
"@pexip-engage/tsconfig": "0.0.9", | ||
"eslint-config-pexip-engage": "0.0.39" | ||
"eslint-config-pexip-engage": "0.0.39", | ||
"@pexip-engage/tsconfig": "0.0.10-canary-20231013111621" | ||
}, | ||
@@ -53,9 +50,8 @@ "volta": { | ||
"scripts": { | ||
"build": "tsup", | ||
"clean": "rm -rf .turbo node_modules dist typings", | ||
"dev": "concurrently \"tsc --build --watch\" \"tsup --watch\"", | ||
"build": "tsc --build", | ||
"clean": "rm -rf .turbo node_modules dist tsconfig.tsbuildinfo", | ||
"dev": "tsc --build --watch", | ||
"lint": "cross-env TIMING=1 eslint --max-warnings=0 .", | ||
"lint:fix": "pnpm lint --fix", | ||
"typecheck": "tsc --build" | ||
"lint:fix": "pnpm lint --fix" | ||
} | ||
} |
@@ -1,4 +0,4 @@ | ||
export type { SupportedLngs } from "./constants"; | ||
export * from "./constants"; | ||
export * from "./PluginState.schema"; | ||
export { getSupportedLng, isSupportedLng } from "./utils"; | ||
export type { SupportedLngs } from "./constants.js"; | ||
export * from "./constants.js"; | ||
export * from "./PluginState.schema.js"; | ||
export { getSupportedLng, isSupportedLng } from "./utils.js"; |
import { z } from "zod"; | ||
import { DEFAULT_FLOW } from "./constants"; | ||
import { getSupportedLng, validateGeoCoordinates, valueToArray } from "./utils"; | ||
import { DEFAULT_FLOW } from "./constants.js"; | ||
import { getSupportedLng, validateGeoCoordinates, valueToArray } from "./utils.js"; | ||
export const MeetingTypeSchema = z.enum(["video", "phone", "on_location", "office"]); | ||
// TODO fix this.. | ||
export const MeetingTypeSchema = z.enum(["VIDEO", "PHONE", "ON_LOCATION", "OFFICE"]); | ||
export const IntentSchema = z.enum([ | ||
@@ -257,3 +258,6 @@ "schedule", | ||
language: StringSchema.transform((value) => getSupportedLng(value)), | ||
meetingTypes: ArraySchema, | ||
meetingTypes: z | ||
.union([MeetingTypeSchema, MeetingTypeSchema.array()]) | ||
.nullish() | ||
.transform((val) => valueToArray(val) ?? []), | ||
application: z | ||
@@ -260,0 +264,0 @@ .object({ |
@@ -1,2 +0,2 @@ | ||
import { SUPPORTED_LNGS, SupportedLngs } from "./constants"; | ||
import { SUPPORTED_LNGS, type SupportedLngs } from "./constants.js"; | ||
@@ -22,6 +22,6 @@ const SPACE_OR_COMMA = /[\s,]+/; | ||
export function valueToArray( | ||
input?: string | string[] | null, | ||
export function valueToArray<T extends string>( | ||
input?: T | T[] | null, | ||
separator: string | RegExp = SPACE_OR_COMMA, | ||
) { | ||
): T[] | undefined { | ||
if (typeof input === "string") { | ||
@@ -31,3 +31,3 @@ const trimmed = input.trim(); | ||
return trimmed.split(separator).filter(Boolean); | ||
return trimmed.split(separator).filter(Boolean) as T[]; | ||
} | ||
@@ -34,0 +34,0 @@ |
Sorry, the diff of this file is not supported yet
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
20
2091
Yes
96167
2
1