Skip to content

Commit 92a5651

Browse files
authored
Merge pull request #68 from contentstack/feat/DX-654-updateAssetURLForGQL
chore: update version and changelog file
2 parents 18c5993 + 21b9538 commit 92a5651

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# Changelog
22

3+
## [1.3.4](https://github.com/contentstack/contentstack-utils-javascript/tree/v1.3.5) (2024-05-31)
4+
- Feat: updateAssetURLForGQL added
5+
36
## [1.3.4](https://github.com/contentstack/contentstack-utils-javascript/tree/v1.3.4) (2024-05-13)
47
- Fixes for vulnerability issues related to regular expression and options
58

__test__/default-node-options.test.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ const node: Node = {
1414

1515
const imgNode: Node = {
1616
type: NodeType.IMAGE,
17-
attrs: {src: "https://image.url/Donald.jog.png"},
17+
attrs: {src: "https://image.url/Donald.jog.png", style: "color: red;"},
1818
children:[]
1919

2020
}
@@ -35,7 +35,7 @@ const linkNode: Node = {
3535

3636
const linkNodeWithURL: Node = {
3737
type: NodeType.LINK,
38-
attrs: {url: "https://image.url/Donald.jog.png"},
38+
attrs: {url: "https://image.url/Donald.jog.png", style: "color: red;"},
3939
children:[]
4040

4141
}
@@ -66,14 +66,14 @@ describe('Default node render options', () => {
6666
let renderString = (defaultNodeOption[NodeType.LINK] as RenderNode)(linkNode, next)
6767
expect(renderString).toEqual(`<a href="${linkNode.attrs.href}">text</a>`)
6868
renderString = (defaultNodeOption[NodeType.IMAGE] as RenderNode)(imgNode, next)
69-
expect(renderString).toEqual('<img src="https://image.url/Donald.jog.png" />text')
69+
expect(renderString).toEqual('<img style=\"color: red;\" src="https://image.url/Donald.jog.png" />text')
7070
renderString = (defaultNodeOption[NodeType.EMBED] as RenderNode)(embedNode, next)
7171
expect(renderString).toEqual('<iframe src="https://www.youtube.com/">text</iframe>')
7272
done()
7373
})
7474
it('Should return link string with url as attr', done => {
7575
let renderString = (defaultNodeOption[NodeType.LINK] as RenderNode)(linkNodeWithURL, next)
76-
expect(renderString).toEqual(`<a href="${linkNodeWithURL.attrs.url}">text</a>`)
76+
expect(renderString).toEqual(`<a style=\"color: red;\" href="${linkNodeWithURL.attrs.url}">text</a>`)
7777
renderString = (defaultNodeOption[NodeType.IMAGE] as RenderNode)(imgNodeWithURL, next)
7878
expect(renderString).toEqual(`<img src="${imgNodeWithURL.attrs.url}" />text`)
7979
renderString = (defaultNodeOption[NodeType.EMBED] as RenderNode)(embedNodeWithURL, next)

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@contentstack/utils",
3-
"version": "1.3.4",
3+
"version": "1.3.5",
44
"description": "Contentstack utilities for Javascript",
55
"main": "dist/index.es.js",
66
"types": "dist/types/index.d.ts",

0 commit comments

Comments
 (0)