Skip to content

Commit

Permalink
Merge pull request #328 from digicatapult/bugfix/sqnc-47-2
Browse files Browse the repository at this point in the history
SQNC-47: update to version.ts and nodejs22
  • Loading branch information
n3op2 authored Nov 25, 2024
2 parents fadda36 + d3c6281 commit 06a697c
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 8 deletions.
6 changes: 3 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@digicatapult/sqnc-process-management",
"version": "2.2.133",
"version": "2.2.134",
"description": "SQNC Process Management Flow",
"main": "./lib/index.js",
"bin": {
Expand All @@ -26,7 +26,7 @@
"/build"
],
"engines": {
"node": ">=20.x.x",
"node": ">=22.x.x",
"npm": ">=10.x.x"
},
"author": "Digital Catapult",
Expand Down
12 changes: 12 additions & 0 deletions src/__tests__/version.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import { expect } from 'chai'

import version from '../version'


describe('version helper', () => {
it('returns a version number from package.json', () => {
expect(typeof version).to.equal('string')
expect(version).to.match((/^(\d+\.)?(\d+\.)?(\*|\d+)$/g))
})

})
6 changes: 3 additions & 3 deletions src/version.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
import packageJson from '../package.json' assert { type: 'json' }
const { version } = packageJson
export default version
const packageJson = await import('../package.json', { with: { type: 'json' }})
const { version } = packageJson.default
export default version

0 comments on commit 06a697c

Please sign in to comment.