@atomist/slack-messages
Advanced tools
Comparing version 1.0.0-master.20180829132449 to 1.0.0-master.20180830183648
@@ -34,14 +34,8 @@ # Changelog | ||
Rug removal release | ||
### Removed | ||
- **BREAKING** `rugButtonFrom` and `rugMenuFrom` have been removed as well as | ||
any dependency to `@atomist/rug`. Similar functionality can now be found | ||
in [`@atomist/automation-client`](https://github.com/atomist/automation-client-ts) | ||
## [0.11.0](https://github.com/atomist/slack-messages/compare/0.10.0...0.11.0) - 2017-08-17 | ||
Option Groups | ||
### Added | ||
@@ -53,35 +47,15 @@ | ||
Menus | ||
### Added | ||
- New function `rugMenuFrom` in SlackMessages for building Slack combo | ||
boxes | ||
## [0.9.0][] - 2017-08-14 | ||
## [0.9.0](https://github.com/atomist/slack-messages/compare/0.8.0...0.9.0) - 2017-08-14 | ||
[0.9.0]: https://github.com/atomist/slack-messages/compare/0.8.0...0.9.0 | ||
Standard messages | ||
### Added | ||
- Add standard formatted Slack messages and ResponseMessage for success, | ||
error, and warning to Rug messages. Add standard colors for each | ||
case. | ||
- Deprecate renderError | ||
and renderSuccess | ||
## [0.8.0] - 2017-08-14 | ||
## [0.8.0](https://github.com/atomist/slack-messages/compare/0.7.0...0.8.0) - 2017-08-14 | ||
[0.8.0]: https://github.com/atomist/slack-messages/compare/0.7.0...0.8.0 | ||
Standard messages release | ||
### Fixed | ||
- Improved Markdown to Slack markup conversion [#17][17] | ||
[17]: https://github.com/atomist/slack-messages/issues/17 | ||
### Added | ||
@@ -94,29 +68,25 @@ | ||
- renderError and renderSuccess have been replaced by errorResponse | ||
and successResponse | ||
## [0.7.0] - 2017-07-04 | ||
### Fixed | ||
[0.7.0]: https://github.com/atomist/slack-messages/compare/0.6.0...0.7.0 | ||
- Improved Markdown to Slack markup conversion [#17](https://github.com/atomist/slack-messages/issues/17) | ||
## [0.7.0](https://github.com/atomist/slack-messages/compare/0.6.0...0.7.0) - 2017-07-04 | ||
### Breaking | ||
- Moved emptyString from SlackMessages to Common | ||
- Moved emptyString from SlackMessages to Common | ||
### Added | ||
- Support conversion of GitHub markdown to Slack markdown | ||
- Support conversion of GitHub markdown to Slack markdown | ||
## [0.6.0] - 2017-05-16 | ||
## [0.6.0](https://github.com/atomist/slack-messages/compare/0.5.1...0.6.0) - 2017-05-16 | ||
[0.6.0]: https://github.com/atomist/slack-messages/compare/0.5.1...0.6.0 | ||
### Fixed | ||
- Enforce message validation to ensure rendered buttons can be clicked: | ||
[#10](https://github.com/atomist/slack-messages/issues/10) | ||
- Enforce message validation to ensure rendered buttons can be clicked: | ||
## [0.5.1] - 2017-05-15 | ||
## [0.5.1](https://github.com/atomist/slack-messages/compare/0.5.0...0.5.1) - 2017-05-15 | ||
[0.5.1]: https://github.com/atomist/slack-messages/compare/0.5.0...0.5.1 | ||
### Fixed | ||
@@ -126,6 +96,4 @@ | ||
## [0.5.0] - 2017-05-15 | ||
## [0.5.0](https://github.com/atomist/slack-messages/compare/0.4.0...0.5.0) - 2017-05-15 | ||
[0.5.0]: https://github.com/atomist/slack-messages/compare/0.4.0...0.5.0 | ||
### Added | ||
@@ -135,7 +103,2 @@ | ||
### Fixed | ||
- Fixes [#8](https://github.com/atomist/slack-messages/issues/8) (TypeError: key.charAt is not a function) | ||
- Slack helper function will render empty string when given undefined values | ||
### Changed | ||
@@ -146,19 +109,15 @@ | ||
## [0.4.0] - 2017-05-10 | ||
### Fixed | ||
[0.4.0]: https://github.com/atomist/slack-messages/compare/0.3.1...0.4.0 | ||
- Fixes [#8](https://github.com/atomist/slack-messages/issues/8) (TypeError: key.charAt is not a function) | ||
- Slack helper function will render empty string when given undefined values | ||
## [0.4.0](https://github.com/atomist/slack-messages/compare/0.3.1...0.4.0) - 2017-05-10 | ||
### Fixed | ||
- **BREAKING** Flatten module structure. You will need to update your | ||
import statements: | ||
before: `import { ... } from "@atomist/slack-messages/build/src/RugMessages";` | ||
## [0.3.1](https://github.com/atomist/slack-messages/compare/0.3.0...0.3.1) - 2017-05-10 | ||
after: `import { ... } from "@atomist/slack-messages/RugMessages";` | ||
## [0.3.1] - 2017-05-10 | ||
[0.3.1]: https://github.com/atomist/slack-messages/compare/0.3.0...0.3.1 | ||
### Fixed | ||
@@ -168,15 +127,10 @@ | ||
## [0.3.0] - 2017-05-10 | ||
## [0.3.0](https://github.com/atomist/slack-messages/compare/0.2.0...0.3.0) - 2017-05-10 | ||
[0.3.0]: https://github.com/atomist/slack-messages/compare/0.2.0...0.3.0 | ||
### Changed | ||
- **BREAKING** `Action` fields `name` and `type` are now required in order | ||
to match Slack required fields | ||
## [0.2.0] - 2017-05-09 | ||
## [0.2.0](https://github.com/atomist/slack-messages/compare/0.1.0...0.2.0) - 2017-05-09 | ||
[0.2.0]: https://github.com/atomist/slack-messages/compare/0.1.0...0.2.0 | ||
### Added | ||
@@ -193,8 +147,4 @@ | ||
## [0.1.0] - 2017-05-09 | ||
## [0.1.0](https://github.com/atomist/slack-messages/releases/tag/0.1.0) - 2017-05-09 | ||
Initial release | ||
[0.1.0]: https://github.com/atomist/slack-messages/releases/tag/0.1.0 | ||
### Added | ||
@@ -201,0 +151,0 @@ |
@@ -18,2 +18,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const splitProcessor_1 = require("./splitProcessor"); | ||
/** | ||
@@ -118,3 +119,5 @@ * Try to handle adjacent HTML and Markdown elements that cannot be | ||
function convertMarkdown(text) { | ||
return convertLinks(convertImageLinks(convertInlineImages(convertNamedLinks(convertFormat(text))))); | ||
const relinked = convertLinks(convertImageLinks(convertInlineImages(convertNamedLinks(text)))); | ||
const urlSplitter = /(<.*>|https?:\/\/\S+)/g; | ||
return splitProcessor_1.splitProcessor(relinked, convertFormat, urlSplitter); | ||
} | ||
@@ -130,10 +133,5 @@ /** | ||
function githubToSlack(text) { | ||
const splitRegex = /(```[\S\s]*?```(?!`)|`.*?`)/mg; | ||
const hunks = text.split(splitRegex); | ||
for (let i = 0; i < hunks.length; i += 2) { | ||
hunks[i] = convertMarkdown(hunks[i]); | ||
} | ||
return hunks.join(""); | ||
return splitProcessor_1.splitProcessor(text, convertMarkdown); | ||
} | ||
exports.githubToSlack = githubToSlack; | ||
//# sourceMappingURL=Markdown.js.map |
@@ -18,2 +18,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const splitProcessor_1 = require("./splitProcessor"); | ||
/** | ||
@@ -36,6 +37,3 @@ * Helper constants for the MIME types the Slack message API accepts. | ||
if (text) { | ||
return text | ||
.replace(/&/g, "&") | ||
.replace(/</g, "<") | ||
.replace(/>/g, ">"); | ||
return splitProcessor_1.splitProcessor(text, i => i.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">")); | ||
} | ||
@@ -42,0 +40,0 @@ else { |
{ | ||
"name": "@atomist/slack-messages", | ||
"version": "1.0.0-master.20180829132449", | ||
"version": "1.0.0-master.20180830183648", | ||
"description": "Utilities for creating Slack messages", | ||
@@ -53,3 +53,3 @@ "author": { | ||
"compile": "tsc --project .", | ||
"doc": "typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib", | ||
"doc": "typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib", | ||
"lint": "tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"", | ||
@@ -56,0 +56,0 @@ "lint:fix": "npm run lint -- --fix", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
49760
20
618
0