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

chore(typescript): bump TypeScript version #818

Merged
merged 2 commits into from Mar 10, 2021
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 packages/typescript/package.json
Expand Up @@ -61,7 +61,7 @@
"@types/node": "^10.0.0",
"buble": "^0.20.0",
"rollup": "^2.14.0",
"typescript": "^4.1.2"
"typescript": "^4.2.2"
},
"types": "types/index.d.ts"
}
7 changes: 0 additions & 7 deletions packages/typescript/src/preflight.ts
Expand Up @@ -17,8 +17,6 @@ ${pluginName}: Rollup requires that TypeScript produces ES Modules. Unfortunatel
"module" other than "esnext". Unless you know what you're doing, please change "module" to "esnext"
in the target tsconfig.json file or plugin options.`.replace(/\n/g, '');

const rootDirErrorMessage = `${pluginName}: The "rootDir" or "rootDirs" option is required when the "tsconfig" option is not specified and "declaration" is "true".`;

const tsLibErrorMessage = `${pluginName}: Could not find module 'tslib', which is required by this plugin. Is it installed?`;

let undef;
Expand All @@ -30,11 +28,6 @@ export const preflight = ({ config, context, rollupOptions, tslib }: PreflightOp
context.warn(moduleErrorMessage);
}

const { options } = config;
if (options.declaration && !options.configFilePath && !options.rootDir && !options.rootDirs) {
context.error(rootDirErrorMessage);
}

if (!rollupOptions.preserveModules && tslib === null) {
context.error(tsLibErrorMessage);
}
Expand Down
25 changes: 0 additions & 25 deletions packages/typescript/test/snapshots/tsconfig.ts.md

This file was deleted.

Binary file removed packages/typescript/test/snapshots/tsconfig.ts.snap
Binary file not shown.
6 changes: 1 addition & 5 deletions packages/typescript/test/test.js
Expand Up @@ -1020,11 +1020,7 @@ test.serial('picks up on newly included typescript files in watch mode', async (
t.true(usage, 'should contain usage');
});

// TODO: upgrade TypeScript when there is a release containing the fix for this issue
// https://github.com/microsoft/TypeScript/pull/41811. Then enable this test
// More details at https://github.com/rollup/plugins/issues/287. This fails with the message:
// Unexpected token (Note that you need plugins to import files that are not JavaScript)
test.serial.skip('works when code is in src directory', async (t) => {
test.serial('works when code is in src directory', async (t) => {
const bundle = await rollup({
input: 'fixtures/src-dir/src/index.ts',
output: [
Expand Down
50 changes: 0 additions & 50 deletions packages/typescript/test/tsconfig.ts

This file was deleted.

28 changes: 25 additions & 3 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.