Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SQNC-47: update to version.ts and nodejs22 #328

Merged
merged 6 commits into from
Nov 25, 2024
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
10 changes: 10 additions & 0 deletions src/__tests__/version.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import { expect } from 'chai'

import version from '../version'


describe('version helper', () => {
it('returns a version number from package.json', () => {
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