@rushstack/localization-utilities
Advanced tools
Comparing version 0.11.0 to 0.11.1
# Change Log - @rushstack/localization-utilities | ||
This log was last generated on Wed, 21 Aug 2024 05:43:04 GMT and should not be manually modified. | ||
This log was last generated on Wed, 21 Aug 2024 16:24:51 GMT and should not be manually modified. | ||
## 0.11.1 | ||
Wed, 21 Aug 2024 16:24:51 GMT | ||
### Patches | ||
- Fix an issue where `inferDefaultExportInterfaceNameFromFilename` did not apply. | ||
## 0.11.0 | ||
@@ -6,0 +13,0 @@ Wed, 21 Aug 2024 05:43:04 GMT |
@@ -8,5 +8,5 @@ // This file is read by tools that parse documentation comments conforming to the TSDoc standard. | ||
"packageName": "@microsoft/api-extractor", | ||
"packageVersion": "7.47.6" | ||
"packageVersion": "7.47.7" | ||
} | ||
] | ||
} |
@@ -43,3 +43,2 @@ "use strict"; | ||
} | ||
let exportAsDefaultInterfaceName; | ||
if (inferDefaultExportInterfaceNameFromFilename) { | ||
@@ -54,12 +53,18 @@ const lastSlashIndex = Math.max(filePath.lastIndexOf('/'), filePath.lastIndexOf('\\')); | ||
const firstCharUpperCased = normalizedFileName.charAt(0).toUpperCase(); | ||
exportAsDefaultInterfaceName = `I${firstCharUpperCased}${normalizedFileName.slice(1)}`; | ||
if (!exportAsDefaultInterfaceName.endsWith('strings') && | ||
!exportAsDefaultInterfaceName.endsWith('Strings')) { | ||
exportAsDefaultInterfaceName += 'Strings'; | ||
let interfaceName = `I${firstCharUpperCased}${normalizedFileName.slice(1)}`; | ||
if (!interfaceName.endsWith('strings') && !interfaceName.endsWith('Strings')) { | ||
interfaceName += 'Strings'; | ||
} | ||
return { | ||
typings, | ||
exportAsDefault: { | ||
interfaceName | ||
} | ||
}; | ||
} | ||
return { | ||
typings, | ||
exportAsDefaultInterfaceName | ||
}; | ||
else { | ||
return { | ||
typings | ||
}; | ||
} | ||
} | ||
@@ -66,0 +71,0 @@ }); |
{ | ||
"name": "@rushstack/localization-utilities", | ||
"version": "0.11.0", | ||
"version": "0.11.1", | ||
"description": "This plugin contains some useful functions for localization.", | ||
@@ -22,4 +22,4 @@ "main": "lib/index.js", | ||
"@types/xmldoc": "1.1.4", | ||
"@rushstack/heft": "0.67.0", | ||
"local-node-rig": "1.0.0" | ||
"local-node-rig": "1.0.0", | ||
"@rushstack/heft": "0.67.0" | ||
}, | ||
@@ -26,0 +26,0 @@ "scripts": { |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
169939
3719