First of all big props to everyone involved in shipping v4. Very excited to use this 😍 ✨ 🍾
I'm in the process of moving our code over to use v4 of the node-slack-sdk
The first error our tests were failing on was this one.
It looks like in the instantiation you set the user agent, based on some values in the package.json of the library consumer. In our case we have neither a name nor a version defined in our package.json, so all of our test were failing with TypeError: Cannot read property 'replace' of undefined.
After setting values for name and version, we got more tests to pass
I assume the user agent should be instantiated based on the package name and version of @slack/client as opposed to the ultimate consumer of this library? Or at least in my experience that's how other http request libraries tend set the user agent 😬
x in one of the [ ])x in each of the [ ])@slack/client version: 4.0.0
node version: v8.9.3
You're right, it is supposed to work by getting the name and version of @slack/client. I'll have to take a look into how pjson is not doing what I expected it to do. This is definitely related to #466.
the solution i'm proposing involves directly requiring package.json (same as #466). i'm open to other ideas. otherwise i anticipate having a fix out early next week.