-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
[babel 8] Publish .d.ts
files for every package
#16416
Conversation
} | ||
const exports = []; | ||
for (const prop of obj.properties) { | ||
+ // Rollup generates an object of getters for re-exports sometimes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rollup-plugin-dts
currently crashes on namespace objects generated by Rollup. I will open a PR upstream.
Build successful! You can test your changes in the REPL here: https://babeljs.io/repl/build/56891 |
Uhm it looks like |
I'm not sure if we can somehow check compatibility with There is also a long-standing problem where we cannot declare type dependencies, which may result in users having to manually install the dependencies in each type. |
packages/babel-parser/src/index.ts
Outdated
@@ -22,6 +22,7 @@ import { | |||
} from "./tokenizer/types.ts"; | |||
|
|||
import type { Expression, File } from "./types.ts"; | |||
export type { File }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's also export Expression
because there is parseExpression
.
d4bab9e
to
4e399b3
Compare
@@ -3,8 +3,7 @@ import fs from "fs"; | |||
import { join } from "path"; | |||
import { URL, fileURLToPath } from "url"; | |||
import { minify } from "terser"; | |||
import { transformSync } from "@babel/core"; | |||
import presetTypescript from "@babel/preset-typescript"; | |||
import { babel, presetTypescript } from "$repo-utils/babel-top-level"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is because now this package has a devDependency
on @babel/core@workspace
(for types), but we need the root dependency to compile.
Wow CI seems to be green (except for e2e) |
Ready for review! |
This needs some more iteration (e.g. making sure that all the dependencies are set up properly), but given that this is only affecting Babel 8 and only affecting types I plan to merge it soon and then open a follow-up (because the follow-up does a lot of minor changes to most files in our repo). |
- @babel/core - @babel/helper-plugin-test-runner - @babel/plugin-transform-react-jsx
.d.ts
files for every package
kindly request for a new alpha release if it is not too hard |
There are a few known problems in our .d.ts files (see the comments in #16494), but I can publish an alpha tomorrow. |
Fixes #1, Fixes #2
Some examples:
@babel/plugin-proposal-decorators
@babel/preset-env
@babel/core
@babel/traverse