Skip to content

Commit

Permalink
Build: Alphabetize internal import statements
Browse files Browse the repository at this point in the history
  • Loading branch information
Krinkle committed Aug 26, 2024
1 parent 7d7eb09 commit 05a52c8
Show file tree
Hide file tree
Showing 11 changed files with 41 additions and 33 deletions.
9 changes: 7 additions & 2 deletions build/review-package.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,13 @@ const ReleaseAssets = {
fs.writeFileSync(tempPrevPath, prevContent);

const currentPath = path.join(__dirname, '..', file);
process.stdout.write(getDiff(tempPrevPath, currentPath));
await confirm(`Accept ${file}?`);
const diff = getDiff(tempPrevPath, currentPath, { allowUnchanged: true });
if (diff === null) {
console.log(`${file} was unchanged...`);
} else {
process.stdout.write(diff);
await confirm(`Accept ${file}?`);
}
}
{
const file = 'qunit.js';
Expand Down
3 changes: 3 additions & 0 deletions build/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ function getDiff (from, to, options = {}) {
// Expected, `diff` command yields non-zero exit status if files differ
return e.stdout;
}
if (options.allowUnchanged) {
return null;
}
throw new Error(`Unable to diff between ${from} and ${to}`);
}

Expand Down
2 changes: 1 addition & 1 deletion src/core/assert.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import config from './config.js';
import dump from './dump.js';
import equiv from './equiv.js';
import config from './config.js';
import { objectType, objectValues, objectValuesSubset, errorString } from './utilities.js';
import { sourceFromStacktrace } from './stacktrace.js';
import { clearTimeout } from './globals.js';
Expand Down
2 changes: 1 addition & 1 deletion src/core/config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { globalThis, process, sessionStorage } from './globals.js';
import { urlParams } from './urlparams.js';
import { extend } from './utilities.js';
import { urlParams } from './urlparams.js';

/**
* Config object: Maintain internal state
Expand Down
26 changes: 13 additions & 13 deletions src/core/core.js
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
import { window } from './globals.js';
import equiv from './equiv.js';
import dump from './dump.js';
import { unnamedModule, module } from './module.js';
import Assert from './assert.js';
import { test, pushFailure } from './test.js';
import reporters from './reporters.js';
import { createRegisterCallbackFunction } from './callbacks.js';
import config from './config.js';
import diff from './diff.js';
import dump from './dump.js';
import equiv from './equiv.js';
import { on } from './events.js';
import { window } from './globals.js';
import hooks from './hooks.js';
import { objectType, is } from './utilities.js';
import { createRegisterCallbackFunction } from './callbacks.js';
import { stack } from './stacktrace.js';
import { module, unnamedModule } from './module.js';
import onUncaughtException from './on-uncaught-exception.js';
import ProcessingQueue from './processing-queue.js';
import reporters from './reporters.js';
import { stack } from './stacktrace.js';
import { start } from './start.js';
import { urlParams } from './urlparams.js';
import { on } from './events.js';
import onUncaughtException from './on-uncaught-exception.js';
import diff from './diff.js';
import { test, pushFailure } from './test.js';
import { objectType, is } from './utilities.js';
import version from './version.js';
import { start } from './start.js';

config.currentModule = unnamedModule;
config._pq = new ProcessingQueue();
Expand Down
2 changes: 1 addition & 1 deletion src/core/equiv.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { objectType } from './utilities.js';
import { StringSet } from './globals.js';
import { objectType } from './utilities.js';

const BOXABLE_TYPES = new StringSet(['boolean', 'number', 'string']);

Expand Down
2 changes: 1 addition & 1 deletion src/core/on-uncaught-exception.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import config from './config.js';
import { emit } from './events.js';
import { globalSuiteReport } from './module.js';
import { sourceFromStacktrace } from './stacktrace.js';
import { errorString } from './utilities.js';
import { emit } from './events.js';

/**
* Handle a global error that should result in a failed test run.
Expand Down
8 changes: 4 additions & 4 deletions src/core/processing-queue.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import config from './config.js';
import { generateHash, performance } from './utilities.js';
import { runLoggingCallbacks } from './callbacks.js';
import Promise from './promise.js';
import { globalSuiteReport } from './module.js';
import onUncaughtException from './on-uncaught-exception.js';
import { emit } from './events.js';
import { setTimeout } from './globals.js';
import { globalSuiteReport } from './module.js';
import onUncaughtException from './on-uncaught-exception.js';
import Promise from './promise.js';
import { generateHash, performance } from './utilities.js';

/**
* Creates a seeded "sample" generator which is used for randomizing tests.
Expand Down
2 changes: 1 addition & 1 deletion src/core/reporters/HtmlReporter.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { extend, errorString, escapeText } from '../utilities.js';
import diff from '../diff.js';
import dump from '../dump.js';
import { prioritySymbol } from '../events.js';
import { window, document, navigator, StringMap } from '../globals.js';
import { extend, errorString, escapeText } from '../utilities.js';
import version from '../version.js';
import fuzzysort from 'fuzzysort';

Expand Down
4 changes: 2 additions & 2 deletions src/core/reporters/TapReporter.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import kleur from 'kleur';
import { errorString } from '../utilities.js';
import { console } from '../globals.js';
import { annotateStacktrace } from '../stacktrace.js';
import { errorString } from '../utilities.js';
import kleur from 'kleur';

/**
* Format a given value into YAML.
Expand Down
14 changes: 7 additions & 7 deletions src/core/test.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
import { globalThis, setTimeout, clearTimeout, StringMap } from './globals.js';
import { emit } from './events.js';
import Assert from './assert.js';
import { runLoggingCallbacks } from './callbacks.js';
import config from './config.js';
import dump from './dump.js';
import { emit } from './events.js';
import { globalThis, setTimeout, clearTimeout, StringMap } from './globals.js';
import Logger from './logger.js';
import Promise from './promise.js';
import config from './config.js';
import TestReport from './reports/test.js';
import { extractStacktrace, sourceFromStacktrace } from './stacktrace.js';
import {
diff,
errorString,
Expand All @@ -13,10 +17,6 @@ import {
inArray,
performance
} from './utilities.js';
import { runLoggingCallbacks } from './callbacks.js';
import { extractStacktrace, sourceFromStacktrace } from './stacktrace.js';
import dump from './dump.js';
import TestReport from './reports/test.js';

export default function Test (settings) {
this.expected = null;
Expand Down

0 comments on commit 05a52c8

Please sign in to comment.