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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

uziab
Copy link
Contributor

@uziab uziab commented Nov 13, 2024

Resolves #

@uziab uziab requested a review from a team as a code owner November 13, 2024 13:34
Copy link
Contributor

@laviomri laviomri left a comment

Choose a reason for hiding this comment

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

looking good!

"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",
"typescript": "^4.4.3"
Copy link
Contributor

Choose a reason for hiding this comment

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

any reason for not using a newer version?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

used the same version as in the root project. I don't see a reason why not to use a newer version. @talkor do you?

Copy link
Contributor

Choose a reason for hiding this comment

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

we have 4.7.3 in the root and in core, let's stick to it, we will upgrade one day all of them
btw, I think you should automatically get typescript when the root of the monorepo has typescript installed as a dev dep, no?

Copy link
Contributor

Choose a reason for hiding this comment

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

@YossiSaadi yes it should work this way, but that means that when you'll upgrade the TS version you'll have to deal with all packages in one go. If you want, you CAN set each package using its own TS version. This will allow you a more flexible approach

Copy link
Contributor

@YossiSaadi YossiSaadi Nov 14, 2024

Choose a reason for hiding this comment

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

yep, exactly
we do want to have the repo root with packages that should have the same version across all the packages, but were not there yet
eslint, typescript, prettier, etc.

but I think for now, @uziab can use the one from root (or remove the declaration entirely, up to him to decide, not critical for me)

@talkor talkor changed the title add d.ts file compilation to testkit chore: add d.ts file compilation to testkit Nov 13, 2024
Copy link
Contributor

@YossiSaadi YossiSaadi left a comment

Choose a reason for hiding this comment

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

Had a few comments
also, in general, you're not using eslint, prettier, etc. can you add it sometime to the library? it might have ts, lint, or format errors that we're not catching currently

"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",
"typescript": "^4.4.3"
Copy link
Contributor

Choose a reason for hiding this comment

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

we have 4.7.3 in the root and in core, let's stick to it, we will upgrade one day all of them
btw, I think you should automatically get typescript when the root of the monorepo has typescript installed as a dev dep, no?

@@ -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

Choose a reason for hiding this comment

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

same question, why the need for cjs came up? is this really needed?

"import": "./dist/esm/index.js",
"types": "./dist/index.d.ts"
},
"./package.json": "./package.json"
Copy link
Contributor

Choose a reason for hiding this comment

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

this would create a @vibe/testkit/package.json entry
is this really needed?

Copy link
Contributor

Choose a reason for hiding this comment

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

if you just want to export the package.json, it gets exported by default anyway, so no need to declare it in files or in exports

Copy link
Contributor

Choose a reason for hiding this comment

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

"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",
Copy link
Contributor

Choose a reason for hiding this comment

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

is playwright's version locked by accident or is that intended?

Suggested change
"@playwright/test": "1.45.3",
"@playwright/test": "^1.45.3",

"include": [ "buttons", "inputs", "navigation", "pickers", "popover", "text", "utils", "BaseElement.ts", "index.ts"]
}
"compilerOptions": {
"lib": ["ESNext"],
Copy link
Contributor

Choose a reason for hiding this comment

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

Don't you need also "dom" in here?

Copy link
Contributor

Choose a reason for hiding this comment

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

for e2e in general I believe you do
I'm not sure for testkit but I think so as well

"moduleResolution": "node",
"resolveJsonModule": true,
"strict": true,
"experimentalDecorators": true,
Copy link
Contributor

Choose a reason for hiding this comment

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

really needed? do you use it?

"target": "es6",
"module": "commonjs",
"moduleResolution": "node",
"resolveJsonModule": true,
Copy link
Contributor

Choose a reason for hiding this comment

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

do you import json files in your testkit? needed?

"resolveJsonModule": true,
"strict": true,
"experimentalDecorators": true,
"emitDecoratorMetadata": true,
Copy link
Contributor

Choose a reason for hiding this comment

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

same as above, really needed?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants