Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions fixtures/concurrent/time-slicing/src/Clock.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,7 @@ export default class Clock extends PureComponent {
}
}

componentDidUpdate() {
console.log('componentDidUpdate()', this.faceRef.current);
}
componentDidUpdate() {}

componentWillUnmount() {
this.faceRef.current.removeEventListener('click', this.handleClick);
Expand Down
5 changes: 1 addition & 4 deletions fixtures/devtools/scheduling-profiler/run.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ function initDependencies() {
DEPENDENCIES.forEach(([from, to]) => {
const fromPath = join(__dirname, BUILD_DIRECTORY, from);
const toPath = join(__dirname, DEPENDENCIES_DIRECTORY, to);
console.log(`Copying ${fromPath} => ${toPath}`);
copyFileSync(fromPath, toPath);
});
}
Expand Down Expand Up @@ -69,9 +68,7 @@ function initServer() {
};

const server = http.createServer(requestListener);
server.listen(port, host, () => {
console.log(`Server is running on http://${host}:${port}`);
});
server.listen(port, host, () => {});
}

initDependencies();
Expand Down
1 change: 0 additions & 1 deletion fixtures/dom/public/renderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,6 @@
}

function handleError(error) {
console.log(error);
failed = true;
setStatus('Javascript Error');
output.innerHTML = error;
Expand Down
5 changes: 1 addition & 4 deletions fixtures/fizz/scripts/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,8 @@ webpack(
}
const info = stats.toJson();
if (stats.hasErrors()) {
console.log('Finished running webpack with errors.');
info.errors.forEach(e => console.error(e));
process.exit(1);
} else {
console.log('Finished running webpack.');
}
} else {}
}
);
4 changes: 1 addition & 3 deletions fixtures/fizz/server/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,7 @@ app.use(express.static('build'));
app.use(express.static('public'));

app
.listen(PORT, () => {
console.log(`Listening at ${PORT}...`);
})
.listen(PORT, () => {})
.on('error', function(error) {
if (error.syscall !== 'listen') {
throw error;
Expand Down
31 changes: 2 additions & 29 deletions fixtures/flight/scripts/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,31 +70,20 @@ checkBrowsers(paths.appPath, isInteractive)
.then(
({stats, previousFileSizes, warnings}) => {
if (warnings.length) {
console.log(chalk.yellow('Compiled with warnings.\n'));
console.log(warnings.join('\n\n'));
console.log(
'\nSearch for the ' +
chalk.underline(chalk.yellow('keywords')) +
' to learn more about each warning.'
);
console.log(
'To ignore, add ' +
chalk.cyan('// eslint-disable-next-line') +
' to the line before.\n'
);
} else {
console.log(chalk.green('Compiled successfully.\n'));
}
} else {}

console.log('File sizes after gzip:\n');
printFileSizesAfterBuild(
stats,
previousFileSizes,
paths.appBuild,
WARN_AFTER_BUNDLE_GZIP_SIZE,
WARN_AFTER_CHUNK_GZIP_SIZE
);
console.log();

const appPackage = require(paths.appPackageJson);
const publicUrl = paths.publicUrlOrPath;
Expand All @@ -111,30 +100,20 @@ checkBrowsers(paths.appPath, isInteractive)
err => {
const tscCompileOnError = process.env.TSC_COMPILE_ON_ERROR === 'true';
if (tscCompileOnError) {
console.log(
chalk.yellow(
'Compiled with the following type errors (you may want to check these before deploying your app):\n'
)
);
printBuildError(err);
} else {
console.log(chalk.red('Failed to compile.\n'));
printBuildError(err);
process.exit(1);
}
}
)
.catch(err => {
if (err && err.message) {
console.log(err.message);
}
if (err && err.message) {}
process.exit(1);
});

// Create the production build and print the deployment instructions.
function build(previousFileSizes) {
console.log('Creating an optimized production build...');

const compiler = webpack(config);
return new Promise((resolve, reject) => {
compiler.run((err, stats) => {
Expand Down Expand Up @@ -181,12 +160,6 @@ function build(previousFileSizes) {
w => !/Failed to parse source map/.test(w)
);
if (filteredWarnings.length) {
console.log(
chalk.yellow(
'\nTreating warnings as errors because process.env.CI = true.\n' +
'Most CI servers set it automatically.\n'
)
);
return reject(new Error(filteredWarnings.join('\n\n')));
}
}
Expand Down
30 changes: 3 additions & 27 deletions fixtures/flight/scripts/start.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,22 +47,7 @@ if (!checkRequiredFiles([paths.appHtml, paths.appIndexJs])) {
const DEFAULT_PORT = parseInt(process.env.PORT, 10) || 3000;
const HOST = process.env.HOST || '0.0.0.0';

if (process.env.HOST) {
console.log(
chalk.cyan(
`Attempting to bind to HOST environment variable: ${chalk.yellow(
chalk.bold(process.env.HOST)
)}`
)
);
console.log(
`If this was unintentional, check that you haven't mistakenly set it in your shell.`
);
console.log(
`Learn more here: ${chalk.yellow('https://cra.link/advanced-config')}`
);
console.log();
}
if (process.env.HOST) {}

// We require that you explicitly set browsers and do not fall back to
// browserslist defaults.
Expand Down Expand Up @@ -119,15 +104,8 @@ checkBrowsers(paths.appPath, isInteractive)
clearConsole();
}

if (env.raw.FAST_REFRESH && semver.lt(react.version, '16.10.0')) {
console.log(
chalk.yellow(
`Fast Refresh requires React 16.10 or higher. You are using React ${react.version}.`
)
);
}
if (env.raw.FAST_REFRESH && semver.lt(react.version, '16.10.0')) {}

console.log(chalk.cyan('Starting the development server...\n'));
openBrowser(urls.localUrlForBrowser);
});

Expand All @@ -147,8 +125,6 @@ checkBrowsers(paths.appPath, isInteractive)
}
})
.catch(err => {
if (err && err.message) {
console.log(err.message);
}
if (err && err.message) {}
process.exit(1);
});
4 changes: 1 addition & 3 deletions fixtures/flight/server/cli.server.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,7 @@ app.get('/todos', function(req, res) {
]);
});

app.listen(3001, () => {
console.log('Flight Server listening on port 3001...');
});
app.listen(3001, () => {});

app.on('error', function(error) {
if (error.syscall !== 'listen') {
Expand Down
4 changes: 0 additions & 4 deletions fixtures/legacy-jsx-runtimes/lint-runtimes.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ const esLints = {
// Performs sanity checks on bundles *built* by Rollup.
// Helps catch Rollup regressions.
async function lint(folder) {
console.log(`Linting ` + folder);
const eslint = esLints.cjs;

const results = await eslint.lintFiles([
Expand All @@ -42,15 +41,12 @@ async function lint(folder) {
results.some(result => result.errorCount > 0 || result.warningCount > 0)
) {
process.exitCode = 1;
console.log(`Failed`);
const formatter = await eslint.loadFormatter('stylish');
const resultText = formatter.format(results);
console.log(resultText);
}
}

async function lintEverything() {
console.log(`Linting known bundles...`);
await lint('react-14');
await lint('react-15');
await lint('react-16');
Expand Down
4 changes: 1 addition & 3 deletions fixtures/nesting/src/legacy/Greeting.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,7 @@ import {store} from '../store';
import ThemeContext from './shared/ThemeContext';
import Clock from './shared/Clock';

store.subscribe(() => {
console.log('Counter:', store.getState());
});
store.subscribe(() => {});

class AboutSection extends Component {
componentDidMount() {
Expand Down
8 changes: 0 additions & 8 deletions fixtures/packaging/build-all.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,3 @@ fixtureDirs.forEach(dir => {
}
});
});

console.log('-------------------------');
console.log('All fixtures were built!');
console.log('Now ensure all frames display a welcome message:');
console.log(' npm install -g serve');
console.log(' serve ../..');
console.log(' open http://localhost:5000/fixtures/packaging/');
console.log('-------------------------');
9 changes: 3 additions & 6 deletions fixtures/packaging/systemjs-builder/dev/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,7 @@ var Builder = require('systemjs-builder');
var builder = new Builder('/', './config.js');
builder
.buildStatic('./input.js', './output.js')
.then(function() {
console.log('Build complete');
})
.then(function() {})
.catch(function(err) {
console.log('Build error');
console.log(err);
});
console.log(err);
});
9 changes: 3 additions & 6 deletions fixtures/packaging/systemjs-builder/prod/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,7 @@ var Builder = require('systemjs-builder');
var builder = new Builder('/', './config.js');
builder
.buildStatic('./input.js', './output.js')
.then(function() {
console.log('Build complete');
})
.then(function() {})
.catch(function(err) {
console.log('Build error');
console.log(err);
});
console.log(err);
});
4 changes: 1 addition & 3 deletions fixtures/ssr/server/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,7 @@ if (process.env.NODE_ENV === 'development') {
);
}

app.listen(3000, () => {
console.log('Listening on port 3000...');
});
app.listen(3000, () => {});

app.on('error', function(error) {
if (error.syscall !== 'listen') {
Expand Down
5 changes: 1 addition & 4 deletions fixtures/ssr2/scripts/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,8 @@ webpack(
}
const info = stats.toJson();
if (stats.hasErrors()) {
console.log('Finished running webpack with errors.');
info.errors.forEach(e => console.error(e));
process.exit(1);
} else {
console.log('Finished running webpack.');
}
} else {}
}
);
4 changes: 1 addition & 3 deletions fixtures/ssr2/server/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,7 @@ app.use(express.static('build'));
app.use(express.static('public'));

app
.listen(PORT, () => {
console.log(`Listening at ${PORT}...`);
})
.listen(PORT, () => {})
.on('error', function(error) {
if (error.syscall !== 'listen') {
throw error;
Expand Down
1 change: 0 additions & 1 deletion fixtures/stacks/Example.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ class ErrorBoundary extends React.Component {
}

componentDidCatch(error, errorInfo) {
console.log(error.message, errorInfo.componentStack);
this.setState({
componentStack: errorInfo.componentStack,
});
Expand Down
5 changes: 0 additions & 5 deletions packages/react-devtools-extensions/chrome/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,6 @@ const main = async () => {
}
);
}

console.log(chalk.green('\nThe Chrome extension has been built!'));
console.log(chalk.green('You can test this build by running:'));
console.log(chalk.gray('\n# From the react-devtools root directory:'));
console.log('yarn run test:chrome');
};

main();
2 changes: 0 additions & 2 deletions packages/react-devtools-extensions/deploy.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,6 @@ const main = async buildId => {
cwd: buildPath,
stdio: 'inherit',
});

console.log(`Deployed to https://${alias}.now.sh`);
};

module.exports = main;
12 changes: 0 additions & 12 deletions packages/react-devtools-extensions/edge/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,18 +29,6 @@ const main = async () => {
cwd,
});
}

console.log(chalk.green('\nThe Microsoft Edge extension has been built!'));

console.log(chalk.green('\nTo load this extension:'));
console.log(chalk.yellow('Navigate to edge://extensions/'));
console.log(chalk.yellow('Enable "Developer mode"'));
console.log(chalk.yellow('Click "LOAD UNPACKED"'));
console.log(chalk.yellow('Select extension folder - ' + cwd + '\\unpacked'));

console.log(chalk.green('\nYou can test this build by running:'));
console.log(chalk.gray('\n# From the react-devtools root directory:'));
console.log('yarn run test:edge\n');
};

main();
23 changes: 0 additions & 23 deletions packages/react-devtools-extensions/firefox/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,29 +7,6 @@ const build = require('../build');

const main = async () => {
await build('firefox');

console.log(chalk.green('\nThe Firefox extension has been built!'));
console.log(chalk.green('You can test this build by running:'));
console.log(chalk.gray('\n# From the react-devtools root directory:'));
console.log('yarn run test:firefox');
console.log(
chalk.gray('\n# You can also test against upcoming Firefox releases.')
);
console.log(
chalk.gray(
'# First download a release from https://www.mozilla.org/en-US/firefox/channel/desktop/'
)
);
console.log(
chalk.gray(
'# And then tell web-ext which release to use (eg firefoxdeveloperedition, nightly, beta):'
)
);
console.log('WEB_EXT_FIREFOX=nightly yarn run test:firefox');
console.log(chalk.gray('\n# You can test against older versions too:'));
console.log(
'WEB_EXT_FIREFOX=/Applications/Firefox Developer Edition.app/Contents/MacOS/firefox-bin yarn run test:firefox'
);
};

main();
Expand Down
Loading