Closed 742617000027 closed 3 weeks ago
Hi @742617000027, thanks for taking the time to report this!
@filmaj This pull request seems to be the cause of this issue: https://github.com/slackapi/node-slack-sdk/pull/1834 Can you take a look at this tomorrow? Perhaps, just reverting the relevant changes (or making valid changes instead) shoudl resolve it.
I don't think this is a problem with this package; TypeScript 5.0 introduced the ability to import all types from a module. Since the new major version web-api 7.0, we moved to TypeScript 5+.
My suggestion would be to upgrade TypeScript in whatever project consumes this package. Is that possible for you @742617000027 ?
I could release a temporary fix, moving back to the old way, but it would not prevent other, similar such issues in the future. The real question here is: what range of TypeScript versions should this package guarantee compatibility with?
My suggestion would be to upgrade TypeScript in whatever project consumes this package. Is that possible for you @742617000027 ?
We'll evaluate it (it's not like it hasn't been on our agenda for ages 🙃), for now we'll just stick to 7.2.0
then.
The real question here is: what range of TypeScript versions should this package guarantee compatibility with?
Agreed, and I don't think there needs to be endless backward compatibility, but a hint in the release notes that indicates minimum requirements (when they have changed) would be helpful. Or a table that lists compatibility, something like that.
Cheers for being on it so quickly!
https://github.com/launchdarkly/js-core/issues/345 is an example of the same problem: the library uses TypeScript syntax that is only supported in newer versions of TS, so consumers using older versions get a compilation error. That team decided to revert the use of the newer syntax in order to improve the compatibility with older TS versions.
I will work on simply reverting the new syntax - it seems easy enough, and if that's all it takes to support TS 4.7, then I think it is worth it for customers/consumers.
The problem of TypeScript version compatibility remains, though. My initial reaction would be "isn't this what peerDependencies
in package.json
is for?" but then I realize that TypeScript in this situation is a dev dependency 😆 😢 so I don't think that is a viable solution here.
Anyways, I will work on reverting the newer syntax usage this morning and release a 7.3.1. I will file a new issue afterwards to continue the discussion around guaranteeing better TypeScript compatibility and what could be done for that. Will comment here again once 7.3.1 is up.
@slack/web-api
v7.3.1 to fix this has been released.
I also added an "integration test" in #1841 that verifies integrating web-api with a small/dummy project that uses TypeScript v4.7.2 compiles OK, to prevent any future changes from causing a similar issue. This, I think, should guarantee compatibility between web-api and TypeScript 4.7.2+ moving forward 🤞
Hi!
7.3.0
seems to have introducted an issue where a project using@slack/web-api
does not compile any longer (no such issues up until and including7.2.0
):Packages:
Select all that apply:
@slack/web-api
@slack/rtm-api
@slack/webhooks
@slack/oauth
@slack/socket-mode
@slack/types
Reproducible in:
The Slack SDK version
"slack/web-api": "^7.3.0"
TypeScript version
"typescript": "^4.7"
Node.js runtime version
v18.19.0
OS info
ProductName: macOS ProductVersion: 14.5 BuildVersion: 23F79 Darwin Kernel Version 23.5.0: Wed May 1 20:16:51 PDT 2024; root:xnu-10063.121.3~5/RELEASE_ARM64_T8103
Steps to reproduce:
(Share the commands to run, source code, and project settings)
npm i
on the projectnpx tsc
Expected result:
No compile errors.
Actual result:
Compile errors as showcased above.
Requirements
For general questions/issues about Slack API platform or its server-side, could you submit questions at https://my.slack.com/help/requests/new instead. :bow:
Please read the Contributing guidelines and Code of Conduct before creating this issue or pull request. By submitting, you are agreeing to those rules.