Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[v3.0] Fully deprecate maxParallelFileReads #4575

Merged
merged 1 commit into from Jul 15, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/utils/options/normalizeInputOptions.ts
Expand Up @@ -185,7 +185,7 @@ const getmaxParallelFileOps = (
if (typeof maxParallelFileReads === 'number') {
warnDeprecationWithOptions(
'The "maxParallelFileReads" option is deprecated. Use the "maxParallelFileOps" option instead.',
false,
true,
warn,
strictDeprecations
);
Expand Down
Expand Up @@ -25,5 +25,12 @@ module.exports = {
after() {
fs.readFile = fsReadFile;
assert.strictEqual(maxReads, 5, 'Wrong number of parallel file reads: ' + maxReads);
}
},
warnings: [
{
code: 'DEPRECATED_FEATURE',
message:
'The "maxParallelFileReads" option is deprecated. Use the "maxParallelFileOps" option instead.'
}
]
};
Expand Up @@ -25,5 +25,12 @@ module.exports = {
after() {
fs.readFile = fsReadFile;
assert.strictEqual(maxReads, 3, 'Wrong number of parallel file reads: ' + maxReads);
}
},
warnings: [
{
code: 'DEPRECATED_FEATURE',
message:
'The "maxParallelFileReads" option is deprecated. Use the "maxParallelFileOps" option instead.'
}
]
};
Expand Up @@ -32,5 +32,12 @@ module.exports = {
after() {
fs.readFile = fsReadFile;
assert.strictEqual(maxReads, 3, 'Wrong number of parallel file reads: ' + maxReads);
}
},
warnings: [
{
code: 'DEPRECATED_FEATURE',
message:
'The "maxParallelFileReads" option is deprecated. Use the "maxParallelFileOps" option instead.'
}
]
};
7 changes: 5 additions & 2 deletions test/misc/sanity-checks.js
Expand Up @@ -197,10 +197,13 @@ describe('sanity checks', () => {
it('does not throw when using dynamic imports with the "file" option and "inlineDynamicImports"', async () => {
const bundle = await rollup.rollup({
input: 'x',
inlineDynamicImports: true,
plugins: [loader({ x: 'console.log( "x" );import("y");', y: 'console.log( "y" );' })]
});
await bundle.generate({ file: 'x', format: 'es' });
await bundle.generate({
file: 'x',
format: 'es',
inlineDynamicImports: true
});
});

it('throws when using the object form of "input" together with the "file" option', async () => {
Expand Down