@pdfme/common 5.2.4-dev.1 → 5.2.4-dev.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/src/constants.js +2 -2
- package/dist/cjs/src/constants.js.map +1 -1
- package/dist/esm/src/constants.js +2 -2
- package/dist/esm/src/constants.js.map +1 -1
- package/dist/types/src/constants.d.ts +1 -1
- package/package.json +2 -1
- package/replace-version.js +20 -0
- package/src/constants.ts +2 -2
@@ -1,8 +1,8 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
exports.DEFAULT_FONT_VALUE = exports.DEFAULT_FONT_NAME = exports.BLANK_PDF = exports.ZOOM = exports.MM_TO_PT_RATIO = exports.PT_TO_MM_RATIO = exports.PT_TO_PX_RATIO = exports.PDFME_VERSION = void 0;
|
4
|
-
//
|
5
|
-
exports.PDFME_VERSION = '5.
|
4
|
+
// This value is auto-replaced with the latest Git tag during the build, including npm releases, so no manual updates are needed.
|
5
|
+
exports.PDFME_VERSION = '5.2.4';
|
6
6
|
exports.PT_TO_PX_RATIO = 1.333;
|
7
7
|
exports.PT_TO_MM_RATIO = 0.3528;
|
8
8
|
exports.MM_TO_PT_RATIO = 2.8346; // https://www.ddc.co.jp/words/archives/20090701114500.html
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../src/constants.ts"],"names":[],"mappings":";;;AAAA,
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../src/constants.ts"],"names":[],"mappings":";;;AAAA,iIAAiI;AACpH,QAAA,aAAa,GAAG,OAAO,CAAC;AACxB,QAAA,cAAc,GAAG,KAAK,CAAC;AACvB,QAAA,cAAc,GAAG,MAAM,CAAC;AACxB,QAAA,cAAc,GAAG,MAAM,CAAC,CAAC,2DAA2D;AACpF,QAAA,IAAI,GAAG,YAAY,CAAC;AAEjC,6BAA6B;AAC7B,uCAAuC;AACvC,gBAAgB;AAChB,iBAAiB;AACjB,+BAA+B;AAC/B,KAAK;AAEQ,QAAA,SAAS,GACpB,8kCAA8kC,CAAC;AACpkC,QAAA,iBAAiB,GAAG,QAAQ,CAAC;AAC7B,QAAA,kBAAkB,GAC7B,mwxKAAmwxK,CAAC"}
|
@@ -1,5 +1,5 @@
|
|
1
|
-
//
|
2
|
-
export const PDFME_VERSION = '5.
|
1
|
+
// This value is auto-replaced with the latest Git tag during the build, including npm releases, so no manual updates are needed.
|
2
|
+
export const PDFME_VERSION = '5.2.4';
|
3
3
|
export const PT_TO_PX_RATIO = 1.333;
|
4
4
|
export const PT_TO_MM_RATIO = 0.3528;
|
5
5
|
export const MM_TO_PT_RATIO = 2.8346; // https://www.ddc.co.jp/words/archives/20090701114500.html
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../src/constants.ts"],"names":[],"mappings":"AAAA,
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../src/constants.ts"],"names":[],"mappings":"AAAA,iIAAiI;AACjI,MAAM,CAAC,MAAM,aAAa,GAAG,OAAO,CAAC;AACrC,MAAM,CAAC,MAAM,cAAc,GAAG,KAAK,CAAC;AACpC,MAAM,CAAC,MAAM,cAAc,GAAG,MAAM,CAAC;AACrC,MAAM,CAAC,MAAM,cAAc,GAAG,MAAM,CAAC,CAAC,2DAA2D;AACjG,MAAM,CAAC,MAAM,IAAI,GAAG,YAAY,CAAC;AAEjC,6BAA6B;AAC7B,uCAAuC;AACvC,gBAAgB;AAChB,iBAAiB;AACjB,+BAA+B;AAC/B,KAAK;AAEL,MAAM,CAAC,MAAM,SAAS,GACpB,8kCAA8kC,CAAC;AACjlC,MAAM,CAAC,MAAM,iBAAiB,GAAG,QAAQ,CAAC;AAC1C,MAAM,CAAC,MAAM,kBAAkB,GAC7B,mwxKAAmwxK,CAAC"}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@pdfme/common",
|
3
|
-
"version": "5.2.4-dev.
|
3
|
+
"version": "5.2.4-dev.2",
|
4
4
|
"sideEffects": false,
|
5
5
|
"author": "hand-dot",
|
6
6
|
"license": "MIT",
|
@@ -33,6 +33,7 @@
|
|
33
33
|
},
|
34
34
|
"scripts": {
|
35
35
|
"dev": "tsc -p tsconfig.esm.json -w",
|
36
|
+
"prebuild": "node replace-version.js",
|
36
37
|
"build": "npm-run-all --parallel build:cjs build:esm",
|
37
38
|
"build:cjs": "tsc -p tsconfig.cjs.json",
|
38
39
|
"build:esm": "tsc -p tsconfig.esm.json",
|
@@ -0,0 +1,20 @@
|
|
1
|
+
const fs = require('fs');
|
2
|
+
const path = require('path');
|
3
|
+
const { execSync } = require('child_process');
|
4
|
+
|
5
|
+
try {
|
6
|
+
const gitTag = execSync('git describe --tags $(git rev-list --tags --max-count=1)', { encoding: 'utf8' }).trim();
|
7
|
+
|
8
|
+
const filePath = path.join(__dirname, 'src/constants.ts');
|
9
|
+
|
10
|
+
let content = fs.readFileSync(filePath, 'utf8');
|
11
|
+
|
12
|
+
content = content.replace(/export const PDFME_VERSION = '.*';/, `export const PDFME_VERSION = '${gitTag}';`);
|
13
|
+
|
14
|
+
fs.writeFileSync(filePath, content, 'utf8');
|
15
|
+
|
16
|
+
console.log(`Replaced PDFME_VERSION with '${gitTag}' in ${filePath}`);
|
17
|
+
} catch (error) {
|
18
|
+
console.error('Error replacing PDFME_VERSION:', error);
|
19
|
+
process.exit(1);
|
20
|
+
}
|
package/src/constants.ts
CHANGED
@@ -1,5 +1,5 @@
|
|
1
|
-
//
|
2
|
-
export const PDFME_VERSION = '5.
|
1
|
+
// This value is auto-replaced with the latest Git tag during the build, including npm releases, so no manual updates are needed.
|
2
|
+
export const PDFME_VERSION = '5.2.4';
|
3
3
|
export const PT_TO_PX_RATIO = 1.333;
|
4
4
|
export const PT_TO_MM_RATIO = 0.3528;
|
5
5
|
export const MM_TO_PT_RATIO = 2.8346; // https://www.ddc.co.jp/words/archives/20090701114500.html
|