Skip to content

Commit

Permalink
refactor: rename 'restartable' to 'manualRestart'
Browse files Browse the repository at this point in the history
  • Loading branch information
m4tt72 committed May 16, 2023
1 parent 9c231e3 commit 8148e82
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions lib/compiler/watch-compiler.ts
Expand Up @@ -58,9 +58,9 @@ export class WatchCompiler {
this.createWatchStatusChanged(origWatchStatusReporter, onSuccess),
);

const restartable = getValueOrDefault(
const manualRestart = getValueOrDefault(
configuration,
'compilerOptions.restartable',
'compilerOptions.manualRestart',
appName,
);

Expand All @@ -78,7 +78,7 @@ export class WatchCompiler {
host: ts.CompilerHost,
oldProgram: ts.EmitAndSemanticDiagnosticsBuilderProgram,
) => {
if (restartable) {
if (manualRestart) {
displayManualRestartTip();
}

Expand Down Expand Up @@ -136,7 +136,7 @@ export class WatchCompiler {

const watchProgram = tsBin.createWatchProgram(host);

if (restartable) {
if (manualRestart) {
listenForManualRestart(() => {
watchProgram.close();
this.run(
Expand Down
2 changes: 1 addition & 1 deletion lib/configuration/configuration.ts
Expand Up @@ -23,7 +23,7 @@ interface CompilerOptions {
plugins?: string[] | PluginOptions[];
assets?: string[];
deleteOutDir?: boolean;
restartable?: boolean;
manualRestart?: boolean;
}

interface PluginOptions {
Expand Down
2 changes: 1 addition & 1 deletion lib/configuration/defaults.ts
Expand Up @@ -15,7 +15,7 @@ export const defaultConfiguration: Required<Configuration> = {
webpackConfigPath: 'webpack.config.js',
plugins: [],
assets: [],
restartable: true,
manualRestart: true,
},
generateOptions: {},
};
Expand Down
4 changes: 2 additions & 2 deletions test/lib/configuration/nest-configuration.loader.spec.ts
Expand Up @@ -52,7 +52,7 @@ describe('Nest Configuration Loader', () => {
tsConfigPath: 'tsconfig.json',
webpack: false,
webpackConfigPath: 'webpack.config.js',
restartable: true,
manualRestart: true,
},
generateOptions: {},
});
Expand All @@ -77,7 +77,7 @@ describe('Nest Configuration Loader', () => {
tsConfigPath: 'tsconfig.json',
webpack: false,
webpackConfigPath: 'webpack.config.js',
restartable: true,
manualRestart: true,
},
generateOptions: {},
});
Expand Down

0 comments on commit 8148e82

Please sign in to comment.