Skip to content

Commit 7e4ef85

Browse files
author
Andrei Bratu
committed
Add back prettier plugin for dev
1 parent c8c1e69 commit 7e4ef85

7 files changed

Lines changed: 146 additions & 41 deletions

File tree

.fernignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ tests
2121
.prettierrc.yml
2222
babel.config.js
2323
jest.config.js
24+
.prettierignore
2425

2526
# Package Scripts
2627

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
node_modules
22
.DS_Store
3-
/dist
3+
/dist
4+
.env

.prettierignore

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
src/api/*
2+
src/core/*
3+
src/errors/*
4+
src/serialization/*
5+
6+
Client.ts
7+
environment.ts
8+
index.ts
9+
version.ts

.prettierrc.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,5 @@ importOrderSortSpecifiers: true
66
importOrderGroupNamespaceSpecifiers: true
77
importOrder: ["<THIRD_PARTY_MODULES>", "^[./]"]
88
trailingComma: "all"
9-
# TODO: This fails at release step, figure it out later
10-
# plugins:
11-
# - "@trivago/prettier-plugin-sort-imports"
9+
plugins:
10+
- "@trivago/prettier-plugin-sort-imports"

package.json

Lines changed: 30 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -12,55 +12,56 @@
1212
"test": "jest"
1313
},
1414
"dependencies": {
15-
"url-join": "4.0.1",
16-
"form-data": "^4.0.0",
17-
"formdata-node": "^6.0.3",
18-
"node-fetch": "2.7.0",
19-
"qs": "6.11.2",
20-
"readable-stream": "^4.5.2",
21-
"form-data-encoder": "^4.0.2",
2215
"@opentelemetry/api": "1.9.0",
2316
"@opentelemetry/auto-instrumentations-node": "0.53.0",
2417
"@opentelemetry/sdk-metrics": "1.28.0",
2518
"@opentelemetry/sdk-node": "0.55.0",
2619
"@opentelemetry/sdk-trace-node": "1.28.0",
20+
"@traceloop/ai-semantic-conventions": "0.11.6",
2721
"@traceloop/instrumentation-anthropic": "0.11.1",
2822
"@traceloop/instrumentation-cohere": "0.11.1",
2923
"@traceloop/instrumentation-openai": "0.11.3",
30-
"@traceloop/ai-semantic-conventions": "0.11.6",
31-
"uuid": "11.0.3",
32-
"nanoid": "5.0.9",
3324
"cli-progress": "^3.12.0",
25+
"form-data": "^4.0.0",
26+
"form-data-encoder": "^4.0.2",
27+
"formdata-node": "^6.0.3",
3428
"lodash": "4.17.21",
29+
"nanoid": "5.0.9",
30+
"node-fetch": "2.7.0",
3531
"p-map": "7.0.3",
36-
"stable-hash": "0.0.4"
32+
"qs": "6.11.2",
33+
"readable-stream": "^4.5.2",
34+
"stable-hash": "0.0.4",
35+
"url-join": "4.0.1",
36+
"uuid": "11.0.3"
3737
},
3838
"devDependencies": {
39-
"@types/url-join": "4.0.1",
40-
"@types/qs": "6.9.8",
39+
"@anthropic-ai/sdk": "^0.32.1",
40+
"@babel/core": "^7.26.0",
41+
"@babel/plugin-transform-modules-commonjs": "^7.26.3",
42+
"@babel/preset-env": "^7.26.0",
43+
"@trivago/prettier-plugin-sort-imports": "4.3.0",
44+
"@types/cli-progress": "^3.11.6",
45+
"@types/jest": "29.5.5",
46+
"@types/lodash": "4.14.74",
47+
"@types/node": "17.0.33",
4148
"@types/node-fetch": "2.6.9",
49+
"@types/qs": "6.9.8",
4250
"@types/readable-stream": "^4.0.15",
51+
"@types/url-join": "4.0.1",
52+
"babel-jest": "^29.7.0",
53+
"cohere-ai": "^7.15.0",
54+
"dotenv": "^16.4.6",
4355
"fetch-mock-jest": "^1.5.1",
44-
"webpack": "^5.94.0",
45-
"ts-loader": "^9.3.1",
4656
"jest": "29.7.0",
47-
"@types/jest": "29.5.5",
48-
"ts-jest": "29.1.1",
4957
"jest-environment-jsdom": "29.7.0",
50-
"@types/node": "17.0.33",
58+
"jsonschema": "^1.4.1",
59+
"openai": "^4.74.0",
5160
"prettier": "^3.4.2",
61+
"ts-jest": "29.1.1",
62+
"ts-loader": "^9.3.1",
5263
"typescript": "4.6.4",
53-
"openai": "^4.74.0",
54-
"@anthropic-ai/sdk": "^0.32.1",
55-
"cohere-ai": "^7.15.0",
56-
"dotenv": "^16.4.6",
57-
"jsonschema": "^1.4.1",
58-
"@types/cli-progress": "^3.11.6",
59-
"babel-jest": "^29.7.0",
60-
"@babel/core": "^7.26.0",
61-
"@babel/plugin-transform-modules-commonjs": "^7.26.3",
62-
"@babel/preset-env": "^7.26.0",
63-
"@types/lodash": "4.14.74"
64+
"webpack": "^5.94.0"
6465
},
6566
"browser": {
6667
"fs": false,

src/otel/processor.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import {
55
Span,
66
SpanExporter,
77
SpanProcessor,
8-
} from "@opentelemetry/sdk-trace-base";
8+
} from "@opentelemetry/sdk-trace-node";
99
import { SpanAttributes as AiSemanticConventions } from "@traceloop/ai-semantic-conventions";
1010

1111
import { ModelEndpoints, ModelProviders } from "../api";

yarn.lock

Lines changed: 101 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -596,7 +596,7 @@
596596
dependencies:
597597
tslib "^2.3.1"
598598

599-
"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.12.13", "@babel/code-frame@^7.25.9", "@babel/code-frame@^7.26.0", "@babel/code-frame@^7.26.2":
599+
"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.12.13", "@babel/code-frame@^7.22.13", "@babel/code-frame@^7.25.9", "@babel/code-frame@^7.26.0", "@babel/code-frame@^7.26.2":
600600
version "7.26.2"
601601
resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.26.2.tgz#4b5fab97d33338eff916235055f0ebc21e573a85"
602602
integrity sha512-RJlIHRueQgwWitWgF8OdFYGZX328Ax5BCemNGlqHfplnRT9ESi8JkFlvaVYbS+UubVY6dpv87Fs2u5M29iNFVQ==
@@ -631,7 +631,16 @@
631631
json5 "^2.2.3"
632632
semver "^6.3.1"
633633

634-
"@babel/generator@^7.26.0", "@babel/generator@^7.26.3", "@babel/generator@^7.7.2":
634+
"@babel/generator@7.17.7":
635+
version "7.17.7"
636+
resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.17.7.tgz#8da2599beb4a86194a3b24df6c085931d9ee45ad"
637+
integrity sha512-oLcVCTeIFadUoArDTwpluncplrYBmTCCZZgXCbgNGvOBBiSDDK3eWO4b/+eOTli5tKv1lg+a5/NAXg+nTcei1w==
638+
dependencies:
639+
"@babel/types" "^7.17.0"
640+
jsesc "^2.5.1"
641+
source-map "^0.5.0"
642+
643+
"@babel/generator@^7.23.0", "@babel/generator@^7.26.0", "@babel/generator@^7.26.3", "@babel/generator@^7.7.2":
635644
version "7.26.3"
636645
resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.26.3.tgz#ab8d4360544a425c90c248df7059881f4b2ce019"
637646
integrity sha512-6FF/urZvD0sTeO7k6/B15pMLC4CHUv1426lzr3N01aHJTl046uCAh9LXW/fzeXXjPNCJ6iABW5XaWOsIZB93aQ==
@@ -693,6 +702,28 @@
693702
lodash.debounce "^4.0.8"
694703
resolve "^1.14.2"
695704

705+
"@babel/helper-environment-visitor@^7.22.20":
706+
version "7.24.7"
707+
resolved "https://registry.yarnpkg.com/@babel/helper-environment-visitor/-/helper-environment-visitor-7.24.7.tgz#4b31ba9551d1f90781ba83491dd59cf9b269f7d9"
708+
integrity sha512-DoiN84+4Gnd0ncbBOM9AZENV4a5ZiL39HYMyZJGZ/AZEykHYdJw0wW3kdcsh9/Kn+BRXHLkkklZ51ecPKmI1CQ==
709+
dependencies:
710+
"@babel/types" "^7.24.7"
711+
712+
"@babel/helper-function-name@^7.23.0":
713+
version "7.24.7"
714+
resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.24.7.tgz#75f1e1725742f39ac6584ee0b16d94513da38dd2"
715+
integrity sha512-FyoJTsj/PEUWu1/TYRiXTIHc8lbw+TDYkZuoE43opPS5TrI7MyONBE1oNvfguEXAD9yhQRrVBnXdXzSLQl9XnA==
716+
dependencies:
717+
"@babel/template" "^7.24.7"
718+
"@babel/types" "^7.24.7"
719+
720+
"@babel/helper-hoist-variables@^7.22.5":
721+
version "7.24.7"
722+
resolved "https://registry.yarnpkg.com/@babel/helper-hoist-variables/-/helper-hoist-variables-7.24.7.tgz#b4ede1cde2fd89436397f30dc9376ee06b0f25ee"
723+
integrity sha512-MJJwhkoGy5c4ehfoRyrJ/owKeMl19U54h27YYftT0o2teQ3FJ3nQUf/I3LlJsX4l3qlw7WRXUmiyajvHXoTubQ==
724+
dependencies:
725+
"@babel/types" "^7.24.7"
726+
696727
"@babel/helper-member-expression-to-functions@^7.25.9":
697728
version "7.25.9"
698729
resolved "https://registry.yarnpkg.com/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.25.9.tgz#9dfffe46f727005a5ea29051ac835fb735e4c1a3"
@@ -756,12 +787,19 @@
756787
"@babel/traverse" "^7.25.9"
757788
"@babel/types" "^7.25.9"
758789

790+
"@babel/helper-split-export-declaration@^7.22.6":
791+
version "7.24.7"
792+
resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.24.7.tgz#83949436890e07fa3d6873c61a96e3bbf692d856"
793+
integrity sha512-oy5V7pD+UvfkEATUKvIjvIAH/xCzfsFVw7ygW2SI6NClZzquT+mwdTfgfdbUiceh6iQO0CHtCPsyze/MZ2YbAA==
794+
dependencies:
795+
"@babel/types" "^7.24.7"
796+
759797
"@babel/helper-string-parser@^7.25.9":
760798
version "7.25.9"
761799
resolved "https://registry.yarnpkg.com/@babel/helper-string-parser/-/helper-string-parser-7.25.9.tgz#1aabb72ee72ed35789b4bbcad3ca2862ce614e8c"
762800
integrity sha512-4A/SCr/2KLd5jrtOMFzaKjVtAei3+2r/NChoBNoZ3EyP/+GlhoaEGoWOZUmFmoITP7zOJyHIMm+DYRd8o3PvHA==
763801

764-
"@babel/helper-validator-identifier@^7.25.9":
802+
"@babel/helper-validator-identifier@^7.16.7", "@babel/helper-validator-identifier@^7.25.9":
765803
version "7.25.9"
766804
resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.25.9.tgz#24b64e2c3ec7cd3b3c547729b8d16871f22cbdc7"
767805
integrity sha512-Ed61U6XJc3CVRfkERJWDz4dJwKe7iLmmJsbOGu9wSloNSFttHV0I8g6UAgb7qnK5ly5bGLPd4oXZlxCdANBOWQ==
@@ -788,7 +826,7 @@
788826
"@babel/template" "^7.25.9"
789827
"@babel/types" "^7.26.0"
790828

791-
"@babel/parser@^7.1.0", "@babel/parser@^7.14.7", "@babel/parser@^7.20.7", "@babel/parser@^7.23.9", "@babel/parser@^7.25.9", "@babel/parser@^7.26.0", "@babel/parser@^7.26.3":
829+
"@babel/parser@^7.1.0", "@babel/parser@^7.14.7", "@babel/parser@^7.20.5", "@babel/parser@^7.20.7", "@babel/parser@^7.23.0", "@babel/parser@^7.23.9", "@babel/parser@^7.25.9", "@babel/parser@^7.26.0", "@babel/parser@^7.26.3":
792830
version "7.26.3"
793831
resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.26.3.tgz#8c51c5db6ddf08134af1ddbacf16aaab48bac234"
794832
integrity sha512-WJ/CvmY8Mea8iDXo6a7RK2wbmJITT5fN3BEkRuFlxVyNx8jOKIIhmC4fSkTcPcf8JyavbBwIe6OpiCOBXt/IcA==
@@ -1451,7 +1489,7 @@
14511489
dependencies:
14521490
regenerator-runtime "^0.14.0"
14531491

1454-
"@babel/template@^7.25.9", "@babel/template@^7.3.3":
1492+
"@babel/template@^7.24.7", "@babel/template@^7.25.9", "@babel/template@^7.3.3":
14551493
version "7.25.9"
14561494
resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.25.9.tgz#ecb62d81a8a6f5dc5fe8abfc3901fc52ddf15016"
14571495
integrity sha512-9DGttpmPvIxBb/2uwpVo3dqJ+O6RooAFOS+lB+xDqoE2PVCE8nfoHMdZLpfCQRLwvohzXISPZcgxt80xLfsuwg==
@@ -1460,6 +1498,22 @@
14601498
"@babel/parser" "^7.25.9"
14611499
"@babel/types" "^7.25.9"
14621500

1501+
"@babel/traverse@7.23.2":
1502+
version "7.23.2"
1503+
resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.23.2.tgz#329c7a06735e144a506bdb2cad0268b7f46f4ad8"
1504+
integrity sha512-azpe59SQ48qG6nu2CzcMLbxUudtN+dOM9kDbUqGq3HXUJRlo7i8fvPoxQUzYgLZ4cMVmuZgm8vvBpNeRhd6XSw==
1505+
dependencies:
1506+
"@babel/code-frame" "^7.22.13"
1507+
"@babel/generator" "^7.23.0"
1508+
"@babel/helper-environment-visitor" "^7.22.20"
1509+
"@babel/helper-function-name" "^7.23.0"
1510+
"@babel/helper-hoist-variables" "^7.22.5"
1511+
"@babel/helper-split-export-declaration" "^7.22.6"
1512+
"@babel/parser" "^7.23.0"
1513+
"@babel/types" "^7.23.0"
1514+
debug "^4.1.0"
1515+
globals "^11.1.0"
1516+
14631517
"@babel/traverse@^7.25.9":
14641518
version "7.26.4"
14651519
resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.26.4.tgz#ac3a2a84b908dde6d463c3bfa2c5fdc1653574bd"
@@ -1473,7 +1527,15 @@
14731527
debug "^4.3.1"
14741528
globals "^11.1.0"
14751529

1476-
"@babel/types@^7.0.0", "@babel/types@^7.20.7", "@babel/types@^7.25.9", "@babel/types@^7.26.0", "@babel/types@^7.26.3", "@babel/types@^7.3.3", "@babel/types@^7.4.4":
1530+
"@babel/types@7.17.0":
1531+
version "7.17.0"
1532+
resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.17.0.tgz#a826e368bccb6b3d84acd76acad5c0d87342390b"
1533+
integrity sha512-TmKSNO4D5rzhL5bjWFcVHHLETzfQ/AmbKpKPOSjlP0WoHZ6L911fgoOKY4Alp/emzG4cHJdyN49zpgkbXFEHHw==
1534+
dependencies:
1535+
"@babel/helper-validator-identifier" "^7.16.7"
1536+
to-fast-properties "^2.0.0"
1537+
1538+
"@babel/types@^7.0.0", "@babel/types@^7.17.0", "@babel/types@^7.20.7", "@babel/types@^7.23.0", "@babel/types@^7.24.7", "@babel/types@^7.25.9", "@babel/types@^7.26.0", "@babel/types@^7.26.3", "@babel/types@^7.3.3", "@babel/types@^7.4.4":
14771539
version "7.26.3"
14781540
resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.26.3.tgz#37e79830f04c2b5687acc77db97fbc75fb81f3c0"
14791541
integrity sha512-vN5p+1kl59GVKMvTHt55NzzmYVxprfJD+ql7U9NFIfKCBkYE55LYtS+WtPlaYOyzydrKI8Nezd+aZextrd+FMA==
@@ -3083,6 +3145,18 @@
30833145
js-tiktoken "^1.0.12"
30843146
tslib "^2.3.0"
30853147

3148+
"@trivago/prettier-plugin-sort-imports@4.3.0":
3149+
version "4.3.0"
3150+
resolved "https://registry.yarnpkg.com/@trivago/prettier-plugin-sort-imports/-/prettier-plugin-sort-imports-4.3.0.tgz#725f411646b3942193a37041c84e0b2116339789"
3151+
integrity sha512-r3n0onD3BTOVUNPhR4lhVK4/pABGpbA7bW3eumZnYdKaHkf1qEC+Mag6DPbGNuuh0eG8AaYj+YqmVHSiGslaTQ==
3152+
dependencies:
3153+
"@babel/generator" "7.17.7"
3154+
"@babel/parser" "^7.20.5"
3155+
"@babel/traverse" "7.23.2"
3156+
"@babel/types" "7.17.0"
3157+
javascript-natural-sort "0.7.1"
3158+
lodash "^4.17.21"
3159+
30863160
"@types/aws-lambda@8.10.143":
30873161
version "8.10.143"
30883162
resolved "https://registry.yarnpkg.com/@types/aws-lambda/-/aws-lambda-8.10.143.tgz#383693fbaadc6994a71d64a7c09e8c244fad8dff"
@@ -4624,6 +4698,11 @@ istanbul-reports@^3.1.3:
46244698
html-escaper "^2.0.0"
46254699
istanbul-lib-report "^3.0.0"
46264700

4701+
javascript-natural-sort@0.7.1:
4702+
version "0.7.1"
4703+
resolved "https://registry.yarnpkg.com/javascript-natural-sort/-/javascript-natural-sort-0.7.1.tgz#f9e2303d4507f6d74355a73664d1440fb5a0ef59"
4704+
integrity sha512-nO6jcEfZWQXDhOiBtG2KvKyEptz7RVbpGP4vTD2hLBdmNQSsCiicO2Ioinv6UI4y9ukqnBpy+XZ9H6uLNgJTlw==
4705+
46274706
jest-changed-files@^29.7.0:
46284707
version "29.7.0"
46294708
resolved "https://registry.yarnpkg.com/jest-changed-files/-/jest-changed-files-29.7.0.tgz#1c06d07e77c78e1585d020424dedc10d6e17ac3a"
@@ -5062,6 +5141,11 @@ jsdom@^20.0.0:
50625141
ws "^8.11.0"
50635142
xml-name-validator "^4.0.0"
50645143

5144+
jsesc@^2.5.1:
5145+
version "2.5.2"
5146+
resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-2.5.2.tgz#80564d2e483dacf6e8ef209650a67df3f0c283a4"
5147+
integrity sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==
5148+
50655149
jsesc@^3.0.2:
50665150
version "3.1.0"
50675151
resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-3.1.0.tgz#74d335a234f67ed19907fdadfac7ccf9d409825d"
@@ -5161,7 +5245,7 @@ lodash.sortby@^4.7.0:
51615245
resolved "https://registry.yarnpkg.com/lodash.sortby/-/lodash.sortby-4.7.0.tgz#edd14c824e2cc9c1e0b0a1b42bb5210516a42438"
51625246
integrity sha512-HDWXG8isMntAyRF5vZ7xKuEvOhT4AhlRt/3czTSjvGUxjYCBVRQY48ViDHyfYz9VIoBkW4TMGQNapx+l3RUwdA==
51635247

5164-
lodash@4.17.21:
5248+
lodash@4.17.21, lodash@^4.17.21:
51655249
version "4.17.21"
51665250
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c"
51675251
integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==
@@ -5869,6 +5953,11 @@ source-map-support@~0.5.20:
58695953
buffer-from "^1.0.0"
58705954
source-map "^0.6.0"
58715955

5956+
source-map@^0.5.0:
5957+
version "0.5.7"
5958+
resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc"
5959+
integrity sha512-LbrmJOMUSdEVxIKvdcJzQC+nQhe8FUZQTXQy6+I75skNgn3OoQ0DZA8YnFa7gp8tqtL3KPf1kmo0R5DoApeSGQ==
5960+
58725961
source-map@^0.6.0, source-map@^0.6.1, source-map@~0.6.1:
58735962
version "0.6.1"
58745963
resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263"
@@ -6011,6 +6100,11 @@ tmpl@1.0.5:
60116100
resolved "https://registry.yarnpkg.com/tmpl/-/tmpl-1.0.5.tgz#8683e0b902bb9c20c4f726e3c0b69f36518c07cc"
60126101
integrity sha512-3f0uOEAQwIqGuWW2MVzYg8fV/QNnc/IpuJNG837rLuczAaLVHslWHZQj4IGiEl5Hs3kkbhwL9Ab7Hrsmuj+Smw==
60136102

6103+
to-fast-properties@^2.0.0:
6104+
version "2.0.0"
6105+
resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-2.0.0.tgz#dc5e698cbd079265bc73e0377681a4e4e83f616e"
6106+
integrity sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==
6107+
60146108
to-regex-range@^5.0.1:
60156109
version "5.0.1"
60166110
resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-5.0.1.tgz#1648c44aae7c8d988a326018ed72f5b4dd0392e4"

0 commit comments

Comments
 (0)