Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions .github/actions/setup-node/action.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
name: 'Set up node & dependencies'
description: 'Sets up a typical Node repo with Volta & Yarn caching'
description: 'Sets up a typical Node repo with caching'

runs:
using: 'composite'
steps:
- uses: volta-cli/action@v4
- uses: actions/cache@v4
id: cache
- uses: actions/setup-node@v6
with:
node-version-file: 'package.json'
Comment thread
alikirec marked this conversation as resolved.
cache: 'yarn'
- uses: actions/cache@v5
with:
path: |
**/node_modules
**/.jest-cache
**/.eslintcache
**/.parcel-cache
**/*.tsbuildinfo
**/lib
**/dist
key: ${{ runner.os }}-yarn-v8-${{ hashFiles('**/package.json', '**/yarn.lock', '**/tsconfig.json') }}
key: ${{ runner.os }}-build-artifacts-${{ hashFiles('**/package.json', '**/yarn.lock', '**/tsconfig*.json') }}
restore-keys: |
${{ runner.os }}-yarn-v7-
${{ runner.os }}-build-artifacts-
- name: Install Dependencies
shell: bash
if: steps.cache.outputs.cache-hit != 'true'
run: yarn install --frozen-lockfile --production false
3 changes: 2 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ jobs:
runs-on: ubuntu-latest
name: 'Publish a new version'
environment: release
permissions:
id-token: write # Needed by craft for npm OIDC
steps:
- uses: actions/checkout@v4
with:
Expand All @@ -35,7 +37,6 @@ jobs:
- name: Publish with Craft
env:
GITHUB_TOKEN: ${{ secrets.FS_RELEASE_GITHUB_PAT }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
CRAFT_LOG_LEVEL: ${{ secrets.CRAFT_LOG_LEVEL }}
run: |
yarn workspace @formsort/${{ github.event.inputs.package }} craft prepare --publish ${{ github.event.inputs.version }}
3 changes: 2 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,6 @@
"trivy",
"vuln"
],
"typescript.tsdk": "node_modules/typescript/lib"
"typescript.tsdk": "node_modules/typescript/lib",
"js/ts.tsdk.path": "node_modules/typescript/lib"
}
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
{
"name": "root",
"private": true,
"volta": {
"node": "20.12.2",
"yarn": "1.22.18"
"engines": {
"node": "24.14.1"
},
"workspaces": {
"packages": [
Expand All @@ -25,8 +24,9 @@
"pack": "yarn workspaces run pack"
},
"devDependencies": {
"@sentry/craft": "^2.4.2",
"@sentry/craft": "^2.25.2",
"eslint": "^8.12.0"
},
"version": "0.0.0"
"version": "0.0.0",
"packageManager": "yarn@1.22.18"
}
16 changes: 14 additions & 2 deletions packages/constants/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,24 @@
"access": "public",
"registry": "https://registry.npmjs.org/"
},
"main": "lib/index.js",
"type": "module",
"main": "lib/cjs/index.js",
"module": "lib/esm/index.js",
"types": "lib/esm/index.d.ts",
"exports": {
".": {
"import": "./lib/esm/index.js",
Comment thread
alikirec marked this conversation as resolved.
"require": "./lib/cjs/index.js",
"types": "./lib/esm/index.d.ts"
}
},
"directories": {
"lib": "lib"
},
"scripts": {
"build": "tsc --project tsconfig.build.json",
"build:cjs": "tsc --project tsconfig.build.json",
"build:esm": "tsc --project tsconfig.esm.json",
"build": "yarn build:cjs && yarn build:esm",
"format": "eslint --ext .ts,.tsx src --fix",
"lint": "eslint --ext .ts,.tsx src",
"test": "jest",
Expand Down
5 changes: 3 additions & 2 deletions packages/constants/tsconfig.build.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@
"extends": "./tsconfig.json",
"compilerOptions": {
"types": ["jest"],
"rootDir": "src"
"outDir": "./lib/cjs",
"rootDir": "./src"
},
"include": ["src"],
"exclude": ["lib", "__tests__", "node_modules"]
"exclude": ["lib", "**/*.test.ts", "**/*.test.tsx", "node_modules"]
}
13 changes: 13 additions & 0 deletions packages/constants/tsconfig.esm.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"extends": "@formsort/tsconfig",
"compilerOptions": {
"declaration": true,
"outDir": "./lib/esm",
"module": "ES2020",
"moduleResolution": "node",
"strict": true,
"rootDir": "./src"
},
"include": ["src"],
"exclude": ["lib", "**/*.test.ts", "**/*.test.tsx"]
}
2 changes: 1 addition & 1 deletion packages/custom-question-api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
"eslint-plugin-react": "^7.36.1",
"jest-environment-jsdom": "^29.5.0",
"prettier": "^2.2.1",
"typescript": "^4.6.3",
"typescript": "^4.9.5",
"vite": "^5.4.21"
},
"dependencies": {
Expand Down
3 changes: 1 addition & 2 deletions packages/custom-question-api/src/WindowMessageEmitter.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { EventEmitter } from 'events';

// import from directory for tree shaking
import CustomQuestionMessage from '@formsort/constants/lib/custom-question-message';
import { CustomQuestionMessage } from '@formsort/constants';

const EVENTS_TO_EMIT = new Set([
CustomQuestionMessage.SET_ANSWERS_MSG,
Expand Down
3 changes: 1 addition & 2 deletions packages/custom-question-api/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { type AnswerSemanticType } from '@formsort/constants';
// import from directory for tree shaking
import CustomQuestionMessage from '@formsort/constants/lib/custom-question-message';
import { CustomQuestionMessage } from '@formsort/constants';
import { getValueFromWindowParent, sendMessageToWindowParent } from './utils';

// eslint-disable-next-line @typescript-eslint/ban-types
Expand Down
2 changes: 1 addition & 1 deletion packages/embed-messaging-manager/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"eslint": "^8.12.0",
"jest": "^29.7.0",
"ts-jest": "^29.1.1",
"typescript": "^4.6.3"
"typescript": "^4.9.5"
},
"jest": {
"cacheDirectory": "./.jest-cache",
Expand Down
2 changes: 1 addition & 1 deletion packages/react-embed/examples/event-log/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"@types/react": "^18.0.15",
"@types/react-dom": "^18.0.6",
"parcel": "^2.7.0",
"typescript": "^4.6.3",
"typescript": "^4.9.5",
"tslib": "^2.7.0"
}
}
2 changes: 1 addition & 1 deletion packages/react-embed/examples/simple/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@
"devDependencies": {
"@types/react": "^18.0.15",
"@types/react-dom": "^18.0.6",
"typescript": "^4.6.3"
"typescript": "^4.9.5"
}
}
2 changes: 1 addition & 1 deletion packages/react-embed/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
"react": "^18.2.0",
"react-dom": "^18.2.0",
"ts-jest": "^29.2.6",
"typescript": "^4.6.3"
"typescript": "^4.9.5"
},
"dependencies": {
"@formsort/web-embed-api": "^2.10.0"
Expand Down
3 changes: 1 addition & 2 deletions packages/react-embed/tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"types": ["jest"],
"rootDir": "src"
},
"include": ["src"],
"exclude": ["lib", "__tests__", "node_modules"]
"exclude": ["lib", "src/__tests__/**/*", "node_modules"]
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"description": "Formsort Embed using an authenticated flow",
"main": "src/index.js",
"engines": {
"node": "20.12.2"
"node": "24.14.1"
},
"scripts": {
"start": "webpack serve",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"@parcel/transformer-typescript-tsc": "^2.7.0",
"@types/node": "^17.0.23",
"parcel": "^2.7.0",
"typescript": "^4.6.3",
"typescript": "^4.9.5",
"tslib": "^2.7.0"
},
"dependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/web-embed-api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
"jest": "^29.7.0",
"prettier": "^2.2.1",
"ts-jest": "^29.1.1",
"typescript": "^4.6.3"
"typescript": "^4.9.5"
},
"dependencies": {
"@formsort/embed-messaging-manager": "^0.3.0"
Expand Down
54 changes: 46 additions & 8 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1972,10 +1972,16 @@
resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.59.0.tgz#4584a8a87b29188a4c1fe987a9fcf701e256d86c"
integrity sha512-2HRCml6OztYXyJXAvdDXPKcawukWY2GpR5/nxKp4iBgiO3wcoEGkAaqctIbZcNB6KlUQBIqt8VYkNSj2397EfA==

"@sentry/craft@^2.4.2":
version "2.4.2"
resolved "https://registry.yarnpkg.com/@sentry/craft/-/craft-2.4.2.tgz#88537422b468be78ed24e483776764e6890526b4"
integrity sha512-4bzvZ+Zr9DsOeQRqgdmdoDVeZWPlxiNkrT016Q2txJFN/Hug4OQglgO/fqjP8IZ1bGAD8dEW5Rlv2lZUahAEqg==
"@sentry/craft@^2.25.2":
version "2.25.2"
resolved "https://registry.yarnpkg.com/@sentry/craft/-/craft-2.25.2.tgz#8a85afd94120284f6be7c969d4635f59a4e4eade"
integrity sha512-JludDJB6Lxg7q1+16PyY0N+YccyxXtFCz76ajjp3tXOkLRgNMndDt9Wkp4jQHNkN0rfzHqcPQtykMGxXXivq+Q==
dependencies:
fastest-levenshtein "^1.0.16"
ignore "^7.0.5"
marked "^17.0.1"
p-limit "^6.2.0"
semver "^7.7.3"

"@sinclair/typebox@^0.25.16":
version "0.25.24"
Expand Down Expand Up @@ -4516,6 +4522,11 @@ fastest-levenshtein@^1.0.12:
resolved "https://registry.yarnpkg.com/fastest-levenshtein/-/fastest-levenshtein-1.0.12.tgz#9990f7d3a88cc5a9ffd1f1745745251700d497e2"
integrity sha512-On2N+BpYJ15xIC974QNVuYGMOlEVt4s0EOI3wwMqOmK1fdDY+FN/zltPV8vosq4ad4c/gJ1KHScUn/6AWIgiow==

fastest-levenshtein@^1.0.16:
version "1.0.16"
resolved "https://registry.yarnpkg.com/fastest-levenshtein/-/fastest-levenshtein-1.0.16.tgz#210e61b6ff181de91ea9b3d1b84fdedd47e034e5"
integrity sha512-eRnCtTTtGZFpQCwhJiUOuxPQWRXVKYDn0b2PeHfXL6/Zi53SLAzAHfVhVWK2AryC/WH05kGfxhFIPvTF0SXQzg==

fastq@^1.6.0:
version "1.11.0"
resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.11.0.tgz#bb9fb955a07130a918eb63c1f5161cc32a5d0858"
Expand Down Expand Up @@ -5131,6 +5142,11 @@ ignore@^5.1.8, ignore@^5.2.0:
resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.2.0.tgz#6d3bac8fa7fe0d45d9f9be7bac2fc279577e345a"
integrity sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ==

ignore@^7.0.5:
version "7.0.5"
resolved "https://registry.yarnpkg.com/ignore/-/ignore-7.0.5.tgz#4cb5f6cd7d4c7ab0365738c7aea888baa6d7efd9"
integrity sha512-Hs59xBNfUIunMFgWAbGX5cq6893IbWg4KnrjbYwX3tx0ztorVgTDA6B2sxf8ejHJ4wz8BqGUMYlnzNBer5NvGg==

import-fresh@^3.0.0, import-fresh@^3.1.0, import-fresh@^3.2.1:
version "3.3.0"
resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-3.3.0.tgz#37162c25fcb9ebaa2e6e53d5b4d88ce17d9e0c2b"
Expand Down Expand Up @@ -6349,6 +6365,11 @@ makeerror@1.0.12:
dependencies:
tmpl "1.0.5"

marked@^17.0.1:
version "17.0.5"
resolved "https://registry.yarnpkg.com/marked/-/marked-17.0.5.tgz#8fc6878a439463a007b05d346d2ad50a87ec3f0e"
integrity sha512-6hLvc0/JEbRjRgzI6wnT2P1XuM1/RrrDEX0kPt0N7jGm1133g6X7DlxFasUIx+72aKAr904GTxhSLDrd5DIlZg==

math-intrinsics@^1.1.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/math-intrinsics/-/math-intrinsics-1.1.0.tgz#a0dd74be81e2aa5c2f27e65ce283605ee4e2b7f9"
Expand Down Expand Up @@ -6764,6 +6785,13 @@ p-limit@^3.1.0:
dependencies:
yocto-queue "^0.1.0"

p-limit@^6.2.0:
version "6.2.0"
resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-6.2.0.tgz#c254d22ba6aeef441a3564c5e6c2f2da59268a0f"
integrity sha512-kuUqqHNUqoIWp/c467RI4X6mmyuojY5jGutNU0wVTmEOOfcuwLqyMVoAi9MKi2Ak+5i9+nhmrK4ufZE8069kHA==
dependencies:
yocto-queue "^1.1.1"

p-locate@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-2.0.0.tgz#20a0103b222a70c8fd39cc2e580680f3dde5ec43"
Expand Down Expand Up @@ -7496,6 +7524,11 @@ semver@^7.7.1:
resolved "https://registry.yarnpkg.com/semver/-/semver-7.7.1.tgz#abd5098d82b18c6c81f6074ff2647fd3e7220c9f"
integrity sha512-hlq8tAfn0m/61p4BVRcPzIGr6LKiMwo4VM6dGi6pt4qcRkmNzTcWq6eCEjEh+qXjkMDvPlOFFSGwQjoEa6gyMA==

semver@^7.7.3:
version "7.7.4"
resolved "https://registry.yarnpkg.com/semver/-/semver-7.7.4.tgz#28464e36060e991fa7a11d0279d2d3f3b57a7e8a"
integrity sha512-vFKC2IEtQnVhpT78h1Yp8wzwrf8CM+MzKMHGJZfBtzhZNycRFnXsHk6E5TxIkkMsgNS7mdX3AGB7x2QM2di4lA==

send@0.19.0:
version "0.19.0"
resolved "https://registry.yarnpkg.com/send/-/send-0.19.0.tgz#bbc5a388c8ea6c048967049dbeac0e4a3f09d7f8"
Expand Down Expand Up @@ -8186,10 +8219,10 @@ typed-array-length@^1.0.6:
is-typed-array "^1.1.13"
possible-typed-array-names "^1.0.0"

typescript@^4.6.3:
version "4.6.3"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.6.3.tgz#eefeafa6afdd31d725584c67a0eaba80f6fc6c6c"
integrity sha512-yNIatDa5iaofVozS/uQJEl3JRWLKKGJKh6Yaiv0GLGSuhpFJe7P3SbHZ8/yjAHRQwKRoA6YZqlfjXWmVzoVSMw==
typescript@^4.6.3, typescript@^4.9.5:
version "4.9.5"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.9.5.tgz#095979f9bcc0d09da324d58d03ce8f8374cbe65a"
integrity sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==

unbox-primitive@^1.0.1:
version "1.0.1"
Expand Down Expand Up @@ -8621,3 +8654,8 @@ yocto-queue@^0.1.0:
version "0.1.0"
resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b"
integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==

yocto-queue@^1.1.1:
version "1.2.2"
resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-1.2.2.tgz#3e09c95d3f1aa89a58c114c99223edf639152c00"
integrity sha512-4LCcse/U2MHZ63HAJVE+v71o7yOdIe4cZ70Wpf8D/IyjDKYQLV5GD46B+hSTjJsvV5PztjvHoU580EftxjDZFQ==
Loading