@chialab/esbuild-rna
Advanced tools
Comparing version 0.17.6 to 0.17.7
@@ -830,14 +830,18 @@ import path from 'path'; | ||
.replace('[ext]', () => path.extname(inputFile)) | ||
.replace(/(\/)?\[dir\](\/)?/, (fullMatch, match1, match2) => { | ||
const dir = path.relative(outBase, path.dirname(filePath)); | ||
if (dir) { | ||
return `${match1 || ''}${dir}${match2 || ''}`; | ||
.replace('[hash]', () => this.hash(buffer)) | ||
.split('/') | ||
.reduce((parts, part) => { | ||
if (part === '[dir]') { | ||
return [...parts, ...(path.relative(outBase, path.dirname(filePath)) || '').split(path.sep)]; | ||
} | ||
if (!match1 && match2) { | ||
return ''; | ||
return [...parts, part]; | ||
}, /** @type {string[]} */ ([])) | ||
.map((part) => { | ||
if (part === '..') { | ||
return '_.._'; | ||
} | ||
return match1 || ''; | ||
return part; | ||
}) | ||
.replace('[dir]', () => path.relative(outBase, path.dirname(filePath))) | ||
.replace('[hash]', () => this.hash(buffer)) | ||
.filter((part) => part && part !== '.') | ||
.join('/') | ||
}${path.extname(inputFile)}`; | ||
@@ -921,3 +925,3 @@ } | ||
this.getOutDir() || this.getSourceRoot(), | ||
this.computeName(this.getOption(key) || '[dir]/[name]', filePath, buffer) | ||
this.computeName(this.getOption(key) || (type === Build.ASSET ? '[name]-[hash]' : '[name]'), filePath, buffer) | ||
); | ||
@@ -924,0 +928,0 @@ } |
{ | ||
"name": "@chialab/esbuild-rna", | ||
"type": "module", | ||
"version": "0.17.6", | ||
"version": "0.17.7", | ||
"description": "A framework for esbuild plugins with transform and emit capabilities.", | ||
@@ -6,0 +6,0 @@ "main": "lib/index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
77936
2152