Skip to content

Commit

Permalink
feat(core): Export VENDURE_VERSION constant
Browse files Browse the repository at this point in the history
Relates to #1471
  • Loading branch information
michaelbromley committed Apr 6, 2023
1 parent 71bab46 commit b2a910a
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
1 change: 1 addition & 0 deletions packages/core/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
export { bootstrap, bootstrapWorker } from './bootstrap';
export { VENDURE_VERSION } from './version';
export { generateMigration, revertLastMigration, runMigrations } from './migrate';
export * from './api/index';
export * from './cache/index';
Expand Down
17 changes: 17 additions & 0 deletions packages/core/src/version.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
/* eslint-disable @typescript-eslint/no-var-requires */
/**
* @description
* A constant which holds the current version of the Vendure core. You can use
* this when your code needs to know the version of Vendure which is running.
*
* @example
* ```TypeScript
* import { VENDURE_VERSION } from '\@vendure/core';
*
* console.log('Vendure version:', VENDURE_VERSION);
* ```
*
* @docsCategory common
* @since 2.0.0
*/
export const VENDURE_VERSION: string = require('../package.json').version;

0 comments on commit b2a910a

Please sign in to comment.