Skip to content

Commit 6cb3a72

Browse files
committed
fix sorts
1 parent 98930e0 commit 6cb3a72

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

build/generate-go-licenses.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ function exit(err) {
1919

2020
async function main() {
2121
const line = '-'.repeat(80);
22-
const str = glob(['**/*']).sort().filter((path) => {
22+
const str = glob(['**/*']).filter((path) => {
2323
return /\/((UN)?LICEN(S|C)E|COPYING|NOTICE)/i.test(path);
24-
}).map((path) => {
24+
}).sort().map((path) => {
2525
const body = wrapAnsi(readFileSync(join(base, path), 'utf8') || '', 80);
2626
const name = dirname(path);
2727
return `${line}\n${name}\n${line}\n${body}`;

webpack.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ export default {
207207
outputWriter: ({dependencies}) => {
208208
const line = '-'.repeat(80);
209209
const go = readFileSync('assets/go-licenses.txt');
210-
const js = dependencies.sort().map((module) => {
210+
const js = dependencies.sort((module) => module.name).map((module) => {
211211
const {name, version, licenseName, licenseText} = module;
212212
const body = wrapAnsi(licenseText || '', 80);
213213
return `${line}\n${name}@${version} - ${licenseName}\n${line}\n${body}`;

0 commit comments

Comments
 (0)