-
Notifications
You must be signed in to change notification settings - Fork 29
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
Add support for environments #244
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good so far - added some small suggestions to remove the .
prefix from error messages.
src/libhoney.js
Outdated
if (typeof dataset !== "string" || dataset === "") { | ||
console.error(".dataset must be a non-empty string"); | ||
if (typeof dataset !== "string") { | ||
console.error(".dataset must be a string"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
console.error(".dataset must be a string"); | |
console.error("dataset must be a string"); |
src/libhoney.js
Outdated
return null; | ||
} | ||
|
||
if (dataset === "") { | ||
if (this.isClassic(writeKey)) { | ||
console.error(".dataset must be a non-empty string"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
console.error(".dataset must be a non-empty string"); | |
console.error("dataset must be a non-empty string"); |
src/__tests__/libhoney_test.js
Outdated
|
||
expect(transmission.events).toHaveLength(0); | ||
expect(console.error.mock.calls[0][0]).toBe( | ||
".dataset must be a non-empty string" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
".dataset must be a non-empty string" | |
"dataset must be a non-empty string" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good - thanks @kentquirk
Release PR for 3.1.0 ### Enhancements - Add support for environments (#244) | [@kentquirk](https://github.com/kentquirk) - ci: add node 17 to test matrix (#195) | [@vreynolds](https://github.com/vreynolds) - empower apply-labels action to apply labels (#205) | [@robbkidd](https://github.com/robbkidd) ### Maintenance - gh: add re-triage workflow (#215) | [@vreynolds](https://github.com/vreynolds) - Update dependabot.yml (#212) | [@vreynolds](https://github.com/vreynolds) - Remove husky and lint-staged - Bump @babel/core to 7.16.12 (#230) - Bump @babel/eslint-parser to 7.16.5 (#223) - Bump @babel/preset-env to 7.16.8 (#224) - Bump @rollup/plugin-commonjs to 21.0.1 (#197) - Bump @rollup/plugin-node-resolve to 13.1.3 (#225) - Bump @rollup/plugin-replace to 3.0.1 (#216) - Bump eslint to 8.6.0 (#227) - Bump minimist to 2.5.1 (#220) - Bump superagent from 6.1.0 to 7.0.2 (#226) - Bump vm2 to 3.9.7 (#234)
Which problem is this PR solving?
Closes #238
Short description of the changes