Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: add d.ts file compilation to testkit #2585

Merged
merged 7 commits into from
Nov 20, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
15 changes: 13 additions & 2 deletions packages/testkit/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,16 @@
"TESTING",
"E2E"
],
"module": "dist/esm/index.js",
"types": "dist/index.d.ts",
"exports": {
".": {
"require": "./dist/index.js",
"import": "./dist/esm/index.js",
"types": "./dist/index.d.ts"
},
"./package.json": "./package.json"
uziab marked this conversation as resolved.
Show resolved Hide resolved
},
"author": "monday.com",
"homepage": "https://github.com/mondaycom/vibe#readme",
"license": "ISC",
Expand All @@ -17,13 +27,14 @@
},
"scripts": {
"test:e2e": "npx playwright test",
"build": "tsc",
"build": "tsc && tsc --project tsconfig.esm.json",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this for a different esm and cjs? why we need cjs?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we have clients that use commonjs. i.e the monolith. So we need it for now.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the monolith can use esm as far as I know
@talkor, does it did any trouble to you with @vibe/core when you used esm only?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nope, all good

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you separate the cases? @uziab
have a release with esm only and add cjs if the need arises?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry no, The monolith e2e project can't handle esm, so we would need cjs.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

got ya, ok let's leave it for now and try to tackle it later on

"start-server": "yarn lerna run storybook --scope=monday-ui-react-core"
},
"bugs": {
"url": "https://github.com/mondaycom/vibe/issues"
},
"devDependencies": {
"@playwright/test": "1.45.3"
"@playwright/test": "1.45.3",
YossiSaadi marked this conversation as resolved.
Show resolved Hide resolved
"typescript": "^4.4.3"
uziab marked this conversation as resolved.
Show resolved Hide resolved
}
}
8 changes: 8 additions & 0 deletions packages/testkit/tsconfig.esm.json
uziab marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"outDir": "dist/esm",
"module": "esnext"
},
"include": ["./**/*.ts"]
}
48 changes: 21 additions & 27 deletions packages/testkit/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,28 +1,22 @@
{
"compilerOptions": {
"module": "commonjs",
"target": "es6",
"outDir": "dist",
"strict": true,
"sourceMap": true,
"strictNullChecks": true,
"moduleResolution": "node",
"importHelpers": true,
"esModuleInterop": true,
"skipLibCheck": true,
"forceConsistentCasingInFileNames": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"noFallthroughCasesInSwitch": true,
"strictBindCallApply": true,
"strictFunctionTypes": true,
"strictPropertyInitialization": true,
"rootDir": ".",
"declaration": false,
"downlevelIteration": true,
"experimentalDecorators": true,
"noImplicitOverride": true,
"noImplicitReturns": true,
},
"include": [ "buttons", "inputs", "navigation", "pickers", "popover", "text", "utils", "BaseElement.ts", "index.ts"]
}
"compilerOptions": {
"lib": ["ESNext"],
YossiSaadi marked this conversation as resolved.
Show resolved Hide resolved
"target": "es6",
"module": "commonjs",
"moduleResolution": "node",
"resolveJsonModule": true,
uziab marked this conversation as resolved.
Show resolved Hide resolved
"strict": true,
"experimentalDecorators": true,
uziab marked this conversation as resolved.
Show resolved Hide resolved
"emitDecoratorMetadata": true,
uziab marked this conversation as resolved.
Show resolved Hide resolved
"skipLibCheck": true,
"noImplicitAny": true,
"outDir": "dist",
"baseUrl": ".",
"allowSyntheticDefaultImports": true,
"declaration": true,
"declarationMap": true,
"sourceMap": true
},
"include": ["./**/*.ts"],
"exclude": ["__TESTS__", "./playwright.config.ts", "node_modules", "dist"]
}
Loading
Loading