Skip to content

Commit

Permalink
feat(cli): Snippets libraries target es2017
Browse files Browse the repository at this point in the history
  • Loading branch information
amckinney committed Dec 6, 2024
1 parent 826c1e0 commit 34dffe1
Show file tree
Hide file tree
Showing 7 changed files with 31 additions and 0 deletions.
1 change: 1 addition & 0 deletions generators/go-v2/dynamic-snippets/build.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ async function main() {
minify: true,
dts: true,
outDir: 'dist',
target: "es2017",
external: [
// Test dependencies should not be included in the published package.
'@fern-api/go-formatter',
Expand Down
1 change: 1 addition & 0 deletions generators/go-v2/dynamic-snippets/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
"eslint": "^8.56.0",
"organize-imports-cli": "^0.10.0",
"prettier": "^2.7.1",
"string.prototype.replaceall": "^1.0.10",
"tsup": "^8.3.5",
"typescript": "4.6.4",
"vitest": "^2.0.5"
Expand Down
3 changes: 3 additions & 0 deletions generators/go-v2/dynamic-snippets/src/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
// Required for ES2017 compatibility.
import "string.prototype.replaceall";

export { DynamicSnippetsGenerator } from "./DynamicSnippetsGenerator";
1 change: 1 addition & 0 deletions packages/snippets/core/build.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ async function main() {
minify: true,
dts: true,
outDir: 'dist',
target: "es2017",
external: [
// Exclude the optional dependencies that aren't supported in the browser.
'prettier',
Expand Down
1 change: 1 addition & 0 deletions packages/snippets/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
"vitest": "^2.1.4",
"organize-imports-cli": "^0.10.0",
"prettier": "^2.7.1",
"string.prototype.replaceall": "^1.0.10",
"tsup": "^8.3.5",
"typescript": "4.6.4"
}
Expand Down
3 changes: 3 additions & 0 deletions packages/snippets/core/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
// Required for ES2017 compatibility.
import "string.prototype.replaceall";

export { type Spec } from "./Spec";
export { generateDynamicIR } from "./generateDynamicIR";
21 changes: 21 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 34dffe1

Please sign in to comment.