Skip to content

Commit 77fa52d

Browse files
feat(utils): Replace 'getVersion' function's return statement to use static constant instead of dynamic require.
feat(utils): Replace 'getVersion' function's return statement to use static constant instead of dynamic require.
1 parent 5a600b3 commit 77fa52d

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

src/lib/utils/index.node.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,7 @@ export const b64 = (data: string, safeUrl: boolean = false): string => {
4646
* Return currently used filestack-js sdk version
4747
*/
4848
export const getVersion = () => {
49-
const rootArr = __dirname.split('/');
50-
const fsIndex = rootArr.findIndex((e) => e === 'filestack-js');
51-
const rootDir = rootArr.splice(0, fsIndex + 1).join('/');
52-
53-
return `JS-${require(`${rootDir}/package.json`).version}`;
49+
return 'JS-@{VERSION}';
5450
};
5551

5652
/**

0 commit comments

Comments
 (0)