@batijs/build 0.0.217 → 0.0.219
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/index.js +4 -4
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -112,7 +112,7 @@ async function importTransformer(p) {
|
|
|
112
112
|
}
|
|
113
113
|
function importToPotentialTargets(imp) {
|
|
114
114
|
let subject = imp;
|
|
115
|
-
const ext = path.
|
|
115
|
+
const ext = path.extname(imp);
|
|
116
116
|
const targets = [];
|
|
117
117
|
if (ext.match(/^\.[jt]sx?$/)) {
|
|
118
118
|
subject = subject.replace(/^\.[jt]sx?$/, "");
|
|
@@ -134,7 +134,7 @@ async function main(options, meta) {
|
|
|
134
134
|
function updateAllImports(target, imports) {
|
|
135
135
|
if (!imports) return;
|
|
136
136
|
for (const imp of imports.values()) {
|
|
137
|
-
const importTarget = path.
|
|
137
|
+
const importTarget = path.resolve(path.dirname(target), imp);
|
|
138
138
|
const importTargets = importToPotentialTargets(importTarget);
|
|
139
139
|
for (const imp2 of importTargets) {
|
|
140
140
|
allImports.add(imp2);
|
|
@@ -144,7 +144,7 @@ async function main(options, meta) {
|
|
|
144
144
|
async function triggerPendingTargets(target, imports) {
|
|
145
145
|
if (!imports) return;
|
|
146
146
|
for (const imp of imports.values()) {
|
|
147
|
-
const importTarget = path.
|
|
147
|
+
const importTarget = path.resolve(path.dirname(target), imp);
|
|
148
148
|
const importTargets = importToPotentialTargets(importTarget);
|
|
149
149
|
for (const imp2 of importTargets) {
|
|
150
150
|
if (includeIfImported.has(imp2)) {
|
|
@@ -159,7 +159,7 @@ async function main(options, meta) {
|
|
|
159
159
|
for (const source of sources) {
|
|
160
160
|
for await (const p of walk(source)) {
|
|
161
161
|
const target = toDist(p, source, options.dist);
|
|
162
|
-
const targetAbsolute = path.resolve(target);
|
|
162
|
+
const targetAbsolute = path.isAbsolute(target) ? target : path.resolve(target);
|
|
163
163
|
const parsed = path.parse(p);
|
|
164
164
|
if (parsed.name.match(reIgnoreFile)) {
|
|
165
165
|
continue;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@batijs/build",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.219",
|
|
4
4
|
"description": "",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"keywords": [],
|
|
@@ -10,10 +10,10 @@
|
|
|
10
10
|
"devDependencies": {
|
|
11
11
|
"@types/node": "^18.19.14",
|
|
12
12
|
"tsup": "^8.1.0",
|
|
13
|
-
"@batijs/compile": "0.0.
|
|
13
|
+
"@batijs/compile": "0.0.219"
|
|
14
14
|
},
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"@batijs/core": "0.0.
|
|
16
|
+
"@batijs/core": "0.0.219"
|
|
17
17
|
},
|
|
18
18
|
"main": "./dist/index.js",
|
|
19
19
|
"module": "./dist/index.js",
|