diff --git a/package-lock.json b/package-lock.json index 11ffae8e..4ca8589e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2264,9 +2264,6 @@ "arm64" ], "dev": true, - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -2281,9 +2278,6 @@ "arm64" ], "dev": true, - "libc": [ - "musl" - ], "license": "MIT", "optional": true, "os": [ @@ -2298,9 +2292,6 @@ "ppc64" ], "dev": true, - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -2315,9 +2306,6 @@ "riscv64" ], "dev": true, - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -2332,9 +2320,6 @@ "riscv64" ], "dev": true, - "libc": [ - "musl" - ], "license": "MIT", "optional": true, "os": [ @@ -2349,9 +2334,6 @@ "s390x" ], "dev": true, - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -2366,9 +2348,6 @@ "x64" ], "dev": true, - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -2383,9 +2362,6 @@ "x64" ], "dev": true, - "libc": [ - "musl" - ], "license": "MIT", "optional": true, "os": [ diff --git a/src/slicer/gcode/coders.coffee b/src/slicer/gcode/coders.coffee index 17ea9fdf..0e17ffdb 100644 --- a/src/slicer/gcode/coders.coffee +++ b/src/slicer/gcode/coders.coffee @@ -892,7 +892,7 @@ module.exports = try # Get package version (this will be available in the compiled context). - pkg = require('../../package.json') + pkg = require('../../../package.json') version = pkg.version catch diff --git a/src/slicer/gcode/coders.test.coffee b/src/slicer/gcode/coders.test.coffee index cc535e10..aac271b9 100644 --- a/src/slicer/gcode/coders.test.coffee +++ b/src/slicer/gcode/coders.test.coffee @@ -380,8 +380,11 @@ describe 'G-code Generation (Coders)', -> result = metadataSlicer.codeMetadata() + pkg = require('../../../package.json') + expect(result).toContain('; Generated by Polyslice') - expect(result).toContain('; Version:') + expect(result).toContain('; Version: ' + pkg.version) + expect(result).not.toContain('; Version: Unknown') expect(result).toContain('; Timestamp:') expect(result).toContain('; Repository: https://github.com/jgphilpott/polyslice') expect(result).toContain('; Printer: Ender3')