@sprucelabs/esm-postbuild 6.0.48 → 6.0.50
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/build/esm-postbuild.js +4 -5
- package/package.json +4 -4
package/build/esm-postbuild.js
CHANGED
|
@@ -4,7 +4,10 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
5
5
|
};
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
exports.
|
|
7
|
+
exports.postbuild = postbuild;
|
|
8
|
+
exports.substituteImports = substituteImports;
|
|
9
|
+
exports.loadSubstitueWrite = loadSubstitueWrite;
|
|
10
|
+
exports.processesByGlob = processesByGlob;
|
|
8
11
|
const fs_1 = __importDefault(require("fs"));
|
|
9
12
|
const path_1 = __importDefault(require("path"));
|
|
10
13
|
const chalk_1 = __importDefault(require("chalk"));
|
|
@@ -38,7 +41,6 @@ function isDir(path) {
|
|
|
38
41
|
function postbuild() {
|
|
39
42
|
console.log('yup');
|
|
40
43
|
}
|
|
41
|
-
exports.postbuild = postbuild;
|
|
42
44
|
function substituteImports(stringIn, filepath) {
|
|
43
45
|
const result = `${stringIn}`.replace(/(from |require\()['"]((.*?))['"]/gi, (_, requireOrImport, moduleOrPath) => {
|
|
44
46
|
// if it starts with a . its a locaal path
|
|
@@ -71,7 +73,6 @@ function substituteImports(stringIn, filepath) {
|
|
|
71
73
|
});
|
|
72
74
|
return result;
|
|
73
75
|
}
|
|
74
|
-
exports.substituteImports = substituteImports;
|
|
75
76
|
function loadSubstitueWrite(file) {
|
|
76
77
|
const contents = fs_1.default.readFileSync(file).toString();
|
|
77
78
|
const results = substituteImports(contents, file);
|
|
@@ -79,7 +80,6 @@ function loadSubstitueWrite(file) {
|
|
|
79
80
|
fs_1.default.writeFileSync(file, results);
|
|
80
81
|
}
|
|
81
82
|
}
|
|
82
|
-
exports.loadSubstitueWrite = loadSubstitueWrite;
|
|
83
83
|
function processesByGlob(destination, patterns) {
|
|
84
84
|
const files = globby_1.default.sync(patterns.map((pattern) => path_1.default.join(destination, '/', pattern)), {
|
|
85
85
|
dot: true,
|
|
@@ -91,4 +91,3 @@ function processesByGlob(destination, patterns) {
|
|
|
91
91
|
});
|
|
92
92
|
return fileCount;
|
|
93
93
|
}
|
|
94
|
-
exports.processesByGlob = processesByGlob;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sprucelabs/esm-postbuild",
|
|
3
|
-
"version": "6.0.
|
|
3
|
+
"version": "6.0.50",
|
|
4
4
|
"description": "Script to do thins after build of esm modules",
|
|
5
5
|
"main": "build/esm-postbuild.js",
|
|
6
6
|
"repository": "git@github.com:sprucelabsai-community/esm-postbuild.git",
|
|
@@ -57,9 +57,9 @@
|
|
|
57
57
|
},
|
|
58
58
|
"devDependencies": {
|
|
59
59
|
"@sprucelabs/semantic-release": "^5.0.1",
|
|
60
|
-
"@sprucelabs/test": "^9.0.
|
|
60
|
+
"@sprucelabs/test": "^9.0.30",
|
|
61
61
|
"@types/fs-extra": "^11.0.4",
|
|
62
|
-
"@types/node": "^20.14.
|
|
62
|
+
"@types/node": "^20.14.7",
|
|
63
63
|
"chokidar-cli": "^3.0.0",
|
|
64
64
|
"eslint": "^9.5.0",
|
|
65
65
|
"eslint-config-spruce": "^11.2.24",
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
"ts-node": "^10.9.2",
|
|
71
71
|
"tsc-watch": "^6.2.0",
|
|
72
72
|
"tsconfig-paths": "^4.2.0",
|
|
73
|
-
"typescript": "^5.
|
|
73
|
+
"typescript": "^5.5.2"
|
|
74
74
|
},
|
|
75
75
|
"jest": {
|
|
76
76
|
"maxWorkers": 4,
|