Skip to content

Commit ab6ae82

Browse files
committed
Fix getVersion.
1 parent 1c7a47b commit ab6ae82

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: Release
33
on:
44
push:
55
tags:
6-
- 'v[0-9]+.[0-9]+.[0-9]+'
6+
- v[0-9]+.[0-9]+.[0-9]+
77

88
jobs:
99
build:

src/index.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ import {Outlet} from './outlet';
2020
import {PluginClient} from './plugin-client';
2121
import {Property} from './property';
2222
import * as Utils from './utils';
23+
import pkg from './package.json';
2324

2425
export {
2526
Action,
@@ -43,7 +44,6 @@ export {
4344
Utils,
4445
};
4546

46-
export function getVersion(): number {
47-
// eslint-disable-next-line @typescript-eslint/no-var-requires
48-
return require('./package.json').version;
47+
export function getVersion(): string {
48+
return pkg.version;
4949
}

src/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../package.json

0 commit comments

Comments
 (0)