-
Notifications
You must be signed in to change notification settings - Fork 4
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
[No ticket][TypeScript] Update publishing setup #84
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mschuwalow
commented
Sep 29, 2022
@@ -1,9 +0,0 @@ | |||
*.DS_Store |
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.
Replaced by files
in package.json
mschuwalow
commented
Sep 29, 2022
@@ -1,12 +1,7 @@ | |||
module.exports = { | |||
presets: [ | |||
[ | |||
'@babel/preset-env', | |||
{ | |||
// useBuiltIns: 'usage', |
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.
These were unused
mschuwalow
changed the title
[No ticket] Update publishing setup
[No ticket][TypeScript] Update publishing setup
Oct 6, 2022
leonelcuevas
approved these changes
Dec 12, 2022
3link
approved these changes
Dec 14, 2022
5 tasks
mschuwalow
added a commit
that referenced
this pull request
Jan 12, 2023
* [Hackathon] Typescript (Only types, no refactorings) (#80) * migrate build * try wdio * fix rollup * use terser instead of uglify * update wdio config * update wdio to transpile * update preambled.ts * type everything * fix build * fixed types.ts eslint issues * nycrc * Update src/utils/types.ts Co-authored-by: Wiem Zine El Abidine <welabidine@liveintent.com> * Update src/utils/types.ts Co-authored-by: Wiem Zine El Abidine <welabidine@liveintent.com> * comments * wip * publish javascript lib and types Co-authored-by: Vinod M <vinodmuralidharan@yahoo.com> Co-authored-by: Wiem Zine El Abidine <welabidine@liveintent.com> * [No ticket] Update publishing setup (#84) * finish merge master * fix tests * Update .eslintrc.js Co-authored-by: Wiem Zine El Abidine <welabidine@liveintent.com> * Update .eslintrc.js Co-authored-by: Wiem Zine El Abidine <welabidine@liveintent.com> * Update src/events/event-bus.ts Co-authored-by: Wiem Zine El Abidine <welabidine@liveintent.com> * comments * comments * update files in package.json * expose consts Co-authored-by: Vinod M <vinodmuralidharan@yahoo.com> Co-authored-by: Wiem Zine El Abidine <welabidine@liveintent.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Updates our packaging setup to have a more modern / best practices setup.
After this is merged we will stop emitting the cjs + esm (which is a backwards compat breaking change / we will have one anyway unless we want to generate a fake 'src' folder from typescript).
Instead the following files are created:
Some remarks:
The index.js file is based on ./src/index.ts and allows us to have a very curated import experience for our users.
The generated
./dist/index.mjs
file is just a thin wrapper on top of commonjs modules and follows recommended best practices https://nodejs.org/api/packages.html#packages_dual_commonjs_es_module_packagesThe changes to packages.json allow downstream dependencies to automatically pick the correct module for the module system they use:
https://nodejs.org/api/packages.html#conditional-exports
As a consequence of this we no longer need the ugly explicit import in liveconnectbuilder / prebid (i.e.
import { LiveConnect } from 'live-connect-js/esm/initializer.js';
). Instead we can use the nice import syntax we also use for other dependencies:import { LiveConnect, MinimalLiveConnect } from 'live-connect-js';
Author Todo List:
Ready For Review
status