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

Update files field in package.json #4318

Merged
merged 5 commits into from
Jun 17, 2022
Merged

Conversation

compulim
Copy link
Contributor

@compulim compulim commented Jun 17, 2022

Fixes #4317.

Changelog Entry

Breaking changes

  • Published NPM packages will now only includes /dist, /lib, and /src folders
    • Previously, /dist was missed from our NPM packages

Changed

  • Resolves #4317. Updated package.json to allowlist /dist, /lib, /src, by @compulim in PR #4318

Description

Today, we didn't specify files field in our package.json.

However, we found that npm pack does not pack the /dist folder. It does pack /lib, /src and most files at the root.

Tomorrow, we are specifying files to include /dist, /lib, /src folders.

Design

We want to allow our web developers to try out our development build directly from our botframework-webchat package. However, without /dist folder packed, our web developers can only try out NPM package, but not bundle.

We are allowlisting:

  • /dist for bundles
  • /lib which exports *.js, *.d.ts, *.d.ts.map
  • /src which are referenced by source map at /lib/**/*.d.ts.map

Specific Changes

  • Update package.json for the following packages
    • api, bundle, component, core, and directlinespeech
  • I have added tests and executed them locally
  • I have updated CHANGELOG.md
  • I have updated documentation

Review Checklist

This section is for contributors to review your work.

  • Accessibility reviewed (tab order, content readability, alt text, color contrast)
  • Browser and platform compatibilities reviewed
  • CSS styles reviewed (minimal rules, no z-index)
  • Documents reviewed (docs, samples, live demo)
  • Internationalization reviewed (strings, unit formatting)
  • package.json and package-lock.json reviewed
  • Security reviewed (no data URIs, check for nonce leak)
  • Tests reviewed (coverage, legitimacy)

CHANGELOG.md Outdated Show resolved Hide resolved
@compulim compulim marked this pull request as ready for review June 17, 2022 00:31
CHANGELOG.md Outdated Show resolved Hide resolved
Co-authored-by: TJ Durnford <tjdford@gmail.com>
CHANGELOG.md Outdated Show resolved Hide resolved
Co-authored-by: TJ Durnford <tjdford@gmail.com>
@compulim
Copy link
Contributor Author

Tested local build in release testing. It can load properly and doesn't seem to have missed any essential files.

@compulim compulim merged commit b65edc8 into microsoft:main Jun 17, 2022
@compulim compulim deleted the fix-4317 branch June 17, 2022 01:45
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.

Pack /dist/ bundle in NPM package
2 participants