@vscode/vsce 3.4.3-0 → 3.4.3-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/out/package.js +8 -1
- package/package.json +1 -1
package/out/package.js
CHANGED
|
@@ -1167,8 +1167,15 @@ async function toContentTypes(files) {
|
|
|
1167
1167
|
for (const [extension, contentType] of mimetypes) {
|
|
1168
1168
|
contentTypes.push(`<Default Extension="${extension}" ContentType="${contentType}"/>`);
|
|
1169
1169
|
}
|
|
1170
|
+
// The files array passed into this function has non-deterministic order
|
|
1171
|
+
// depending on filesystem directory traversal. This leads to the order of
|
|
1172
|
+
// the "Default" elements changing from build to build, which prevents
|
|
1173
|
+
// reproducible vsix files. To fix this, this sorts the contentTypes array
|
|
1174
|
+
// to ensure they are listed in the same order regardless of the order of
|
|
1175
|
+
// the files array.
|
|
1176
|
+
const sortedContentTypes = contentTypes.sort();
|
|
1170
1177
|
return `<?xml version="1.0" encoding="utf-8"?>
|
|
1171
|
-
<Types xmlns="http://schemas.openxmlformats.org/package/2006/content-types">${
|
|
1178
|
+
<Types xmlns="http://schemas.openxmlformats.org/package/2006/content-types">${sortedContentTypes.join('')}</Types>
|
|
1172
1179
|
`;
|
|
1173
1180
|
}
|
|
1174
1181
|
exports.toContentTypes = toContentTypes;
|