Skip to content

Commit

Permalink
feat(core): return the name and version of package.json
Browse files Browse the repository at this point in the history
  • Loading branch information
valpinkman committed Jan 31, 2024
1 parent d0843bc commit 402eb4e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ledgerhq/device-sdk-core",
"version": "1.0.0",
"version": "0.0.1",
"license": "MIT",
"main": "lib/index.js",
"types": "lib/index.d.ts",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,10 @@ describe("LocalConfigDataSource", () => {
describe("stubFsReadFile", () => {
it("should return a stringified version of the version object", () => {
expect(LocalConfig.stubFsReadFile()).toEqual(
JSON.stringify({ name: "DeviceSDK", version: "0.0.0-local.1" })
JSON.stringify({
name: "@ledgerhq/device-sdk-core",
version: "0.0.1",
})
);
});
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,11 @@ import {
} from "@internal/config/di/configTypes";
import { Config } from "@internal/config/model/Config";
import { LocalConfigDataSource } from "./ConfigDataSource";
import pkg from "../../../../package.json";

const version = {
name: "DeviceSDK",
version: "0.0.0-local.1",
name: pkg.name,
version: pkg.version,
};

export const stubFsReadFile = () => JSON.stringify(version);
Expand Down

0 comments on commit 402eb4e

Please sign in to comment.