Skip to content

Commit

Permalink
chore(deps): update dependency content-tag to v3 (#6667)
Browse files Browse the repository at this point in the history
* chore(deps): update dependency content-tag to v3

* Let's go

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Arda TANRIKULU <[email protected]>
  • Loading branch information
renovate[bot] and ardatan authored Dec 4, 2024
1 parent f4d5d6f commit 4fd0d3a
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 6 deletions.
5 changes: 5 additions & 0 deletions .changeset/mean-deers-divide.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@graphql-tools/graphql-tag-pluck': patch
---

Support content-tag v3 and support older versions
2 changes: 1 addition & 1 deletion packages/graphql-tag-pluck/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
"@types/babel__traverse": "7.20.6",
"@vue/compiler-sfc": "3.5.13",
"astrojs-compiler-sync": "^1.0.0",
"content-tag": "^2.0.1",
"content-tag": "^3.0.0",
"svelte": "5.5.3",
"svelte2tsx": "0.7.30"
},
Expand Down
7 changes: 6 additions & 1 deletion packages/graphql-tag-pluck/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,12 @@ function parseWithAstroSync(

function transformGlimmerFile(glimmerSyntax: typeof import('content-tag'), fileData: string) {
const processor = new glimmerSyntax.Preprocessor();
return processor.process(fileData);
// backwards compatibility with older versions of content-tag
const result = processor.process(fileData);
if (typeof result === 'string') {
return result;
}
return result.code;
}

/**
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4864,10 +4864,10 @@ [email protected]:
dependencies:
safe-buffer "5.2.1"

content-tag@^2.0.1:
version "2.0.3"
resolved "https://registry.yarnpkg.com/content-tag/-/content-tag-2.0.3.tgz#52b72285256ae0aa49e86b1b5923764df472d61c"
integrity sha512-htLIdtfhhKW2fHlFLnZH7GFzHSdSpHhDLrWVswkNiiPMZ5uXq5JfrGboQKFhNQuAAFF8VNB2EYUj3MsdJrKKpg==
content-tag@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/content-tag/-/content-tag-3.0.0.tgz#b25382edf6c46abf79e6bffb83c2118713af546e"
integrity sha512-HxWPmF9hzehv5PV7TSK7QSzlVBhmwQA8NgBrXmL+fqXfM3L1r3ResAPzeiGbxra3Zw6U3gdhw3cIDJADQnuCVQ==

content-type@~1.0.4, content-type@~1.0.5:
version "1.0.5"
Expand Down

0 comments on commit 4fd0d3a

Please sign in to comment.