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

build: publish ESM and .d.ts #32

Merged
merged 9 commits into from
Jul 2, 2023
Merged

Conversation

cometkim
Copy link
Contributor

  • Upgraded dependencies
  • Fixed the macro
  • Fixed publish configs to includes macro as well
  • Added TypeScript declaration files
  • Made it leaves Flow type definitions as comments
  • Added ESM (modern target) build, resolves ES Module #25

- Upgraded all build dependencies to latest version
  - Babel 7
  - Jest
  - Flow

- Migrated the legacy build target to be using preset-env

- ESM (modern) build using [preset-modules](https://github.com/babel/preset-modules)

- Added TypeScript declaration files

- Added Flow comment types instead of striping it

- Fixed package manifest to publish babel macros
@cometkim
Copy link
Contributor Author

Published the fork as @cometlib/dedent

@adrianjost
Copy link
Contributor

Hi @cometkim would you mind opening this PR also against dedent-tabs which is a version of this project that I still actively maintain and were I keep all dependencies up to date.
I think it would be better if we have fewer published forks so other users do not have to look into a bunch of them and have to decide which updated version they want.
Here is the repo: https://github.com/adrianjost/dedent-tabs

@otakustay
Copy link

We need to manually add types field to package.json, Upcoming TypeScript 4.6's nodenext module resolution won't resolve index.d.ts automatically

Also, for dedent/macro to work with TypeScript 4.6, we need exports mapping in package.json

@otakustay
Copy link

Do we have a ETA on this? We heavily rely on this fantasy library but have some problems using it in pure ESM environment.

Copy link
Collaborator

@JoshuaKGoldberg JoshuaKGoldberg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's a lot of great stuff in here (package bumps! TypeScript types! yay!) but it's hard to take action on a PR that's got so many unrelated things. 🤔

I'll take on some of the discrete parts in order separately. Then will update this PR once those are in.

@JoshuaKGoldberg
Copy link
Collaborator

@cometkim I merged #38's changes into this branch. Do these look good to you?

I'll merge this as-is Soon™️ (say, a couple weeks) if you don't have a chance to take a look, no worries if you can't!

@JoshuaKGoldberg JoshuaKGoldberg changed the title Update package build: publish ESM and .d.ts Jul 2, 2023
Copy link
Collaborator

@JoshuaKGoldberg JoshuaKGoldberg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀 let's ship this!

@JoshuaKGoldberg JoshuaKGoldberg merged commit 128a153 into dmnd:master Jul 2, 2023
@JoshuaKGoldberg JoshuaKGoldberg mentioned this pull request Jul 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ES Module
4 participants