Skip to content

Commit fa31de5

Browse files
Merge branch 'development' into feat/dx-3127
2 parents 72da0d0 + 4123bef commit fa31de5

File tree

5 files changed

+13
-9
lines changed

5 files changed

+13
-9
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,4 +67,5 @@ tsconfig.json
6767
.next
6868
.dccache
6969
dist
70-
jsdocs
70+
jsdocs
71+
.early.coverage

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
# Changelog
2+
## [v1.21.8](https://github.com/contentstack/contentstack-management-javascript/tree/v1.21.8) (2025-07-07)
3+
- Fix
4+
- Fixed branch header conflits
25
## [v1.21.7](https://github.com/contentstack/contentstack-management-javascript/tree/v1.21.7) (2025-06-30)
36
- Fix
47
- Fixed Request-URI Too Large error

lib/entity.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,6 @@ export const move = (http, type, force = false, params = {}) => {
313313
try {
314314
let updateData = {}
315315
const json = cloneDeep(this)
316-
delete json.parent_uid
317316
if (type) {
318317
updateData[type] = json
319318
} else {
@@ -328,7 +327,7 @@ export const move = (http, type, force = false, params = {}) => {
328327
if (force === true) {
329328
headers.params.force = true
330329
}
331-
const response = await http.put(`${this.urlPath}/move`, updateData, headers)
330+
const response = await http.put(`${this.urlPath}/move`, param, headers)
332331
if (response.data) {
333332
return new this.constructor(http, parseData(response, this.stackHeaders, this.content_type_uid, this.taxonomy_uid, http))
334333
} else {

lib/stack/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,8 +168,8 @@ export function Stack (http, data) {
168168
this.globalField = (uidOrOptions = null, option = {}) => {
169169
let globalFieldUid = null
170170
let apiVersion = '3.0'
171-
let branch = 'main'
172171
const stackHeaders = { ...this.stackHeaders }
172+
let branch = stackHeaders.branch || http.defaults.headers.branch || 'main'
173173
if (typeof uidOrOptions === 'object' && uidOrOptions !== null) {
174174
option = uidOrOptions
175175
} else {

test/sanity-check/api/terms-test.js

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -135,13 +135,14 @@ describe('Terms API Test', () => {
135135
})
136136

137137
it('should move the term to parent uid passed', done => {
138-
makeTerms(taxonomy.uid, childTerm2.term.uid).fetch()
138+
const term = {
139+
parent_uid: 'term_test_child1',
140+
order: 1
141+
}
142+
makeTerms(taxonomy.uid, childTerm2.term.uid).move({ term, force: true })
139143
.then(async (term) => {
140-
term.parent_uid = null
141-
const moveTerm = await term.move({ force: true })
142-
expect(moveTerm.parent_uid).to.be.equal(null)
144+
expect(term.parent_uid).to.not.equal(null)
143145
done()
144-
return moveTerm
145146
})
146147
.catch(done)
147148
})

0 commit comments

Comments
 (0)