Closed heimwege closed 4 months ago
Hi, ok, that's a whole list of things...
"@openui5/types": "^1.123.0",
looks like a bug at first glance (the version and it being present)"@types/qunit": "2.5.4"
is a dependency inside the UI5 types (only for the @types/openui5 we don't have control over the referenced type version). The same for jQuery.Actually, looking at the template, it is hard to imagine how TWO UI5 types could end up in the dev dependencies: https://github.com/ui5-community/generator-ui5-ts-app/blob/main/generators/app/templates/package.json#L23
And actually, when trying it locally and watching package.json closely, then first only the correct types are there. Then, something else runs and does stuff in "./webapp/test/e2e/"
. Then the openui5 one appears. So I'd say this probably comes from calling the wdi5 sub-generator to add testing stuff (see https://github.com/ui5-community/generator-ui5-ts-app/commit/dd10070f7b0013bc1316eded13453b50ee3f1193). @petermuessig ?
That's a good hint @akudev I had a look at the generator and it basically just does npm init wdi5 -- --ts
. So I tested it and there it is "@openui5/types": "^1.123.0"
. Should I close this issue here and open it directly in the wdi5 repo?
Probably... just want to avoid a ping-pong between the two repos.
Done. Let's close this one and hope for the best 🤞🏻
Oh yes, good catch and sorry for being late to the party. This must be fixed in the wdi5 generator. There the types must be detected and ignored if present already.
THX, Peter
Cc: @vobu
ACK. Further tracking in https://github.com/ui5-community/create-wdi5/issues/11
Hey hey 👋🏻
I just generated a ts app for sapui5 1.120.11 and noticed that I got two types devDependencies
I would have expected only the
@sapui5/types
one. Is this intended or is this a bug?Speaking about types I'm also missing the respective qunit types that come with sap/ui/thirdparty/qunit-2 (
"@types/qunit": "2.5.4"
afaik). In case you want to use Hooks in the qunit module definition you should be type supported by the version that comes with ui5 instead of the latest version to avoid conflicts during runtime.Same is valid for sap/ui/thirdparty/sinon (
"@types/sinon": "10.0.16"
afaik) in case you want to e.g. stub something in your unit tests likeconst messageBoxStub = sinon.stub(MessageBox, "success") as SinonStub<[text: string], MessageBox>;
you should get the type support for the respective sinon version that comes with sapui5