Skip to content

Commit 24ce274

Browse files
HHHindawyHossam Hindawy
andauthored
[csl-2854] include package version in c parameter (#82)
Co-authored-by: Hossam Hindawy <hossam.hindawy@hossam.hindawy-Q7M9F6QK6G>
1 parent 6b54bca commit 24ce274

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

src/utils.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import ConstructorIOClient from '@constructor-io/constructorio-client-javascript';
22
import { isCustomSection } from './typeGuards';
33
import { OnSubmit, Item, Section, UserDefinedSection, AutocompleteResultSections } from './types';
4+
import { version as packageVersion } from '../package.json';
45

56
export type GetItemPosition = (args: { item: Item; items: Item[] }) => {
67
index: number;
@@ -101,7 +102,7 @@ export const getCioClient = (apiKey?: string) => {
101102
return new ConstructorIOClient({
102103
apiKey,
103104
sendTrackingEvents: true,
104-
version: 'cio-ui-autocomplete',
105+
version: `cio-ui-autocomplete-${packageVersion}`,
105106
});
106107
}
107108

tsconfig-cjs.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@
1616
"skipLibCheck": true,
1717
"allowSyntheticDefaultImports": true,
1818
"noImplicitAny": false,
19-
"importHelpers": true
19+
"importHelpers": true,
20+
"resolveJsonModule": true
2021
},
2122
"include": ["src/**/*.ts"],
2223
"exclude": ["node_modules", "lib", "storybook-static", ".storybook"]

tsconfig.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@
1515
"skipLibCheck": true,
1616
"allowSyntheticDefaultImports": true,
1717
"noImplicitAny": false,
18-
"importHelpers": true
18+
"importHelpers": true,
19+
"resolveJsonModule": true
1920
},
2021
"include": ["src/**/*.ts"],
2122
"exclude": ["node_modules", "lib", "storybook-static", ".storybook"]

0 commit comments

Comments
 (0)