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

fix: add bundler to package #74

Merged
merged 1 commit into from
Feb 23, 2022
Merged

Conversation

alexandersmanning
Copy link
Contributor

@alexandersmanning alexandersmanning commented Feb 19, 2022

Please explain the changes you made here.
This adds a bundler in regards to the issue brought up in #67

The WebSDK library did not work with Webpack 5 due to file extensions missing for modules. The solution the developer provided was to add a .js file extension within the .ts file. The reason they do this is because tsc (Typescript Compiler) does not add the .js extension onto imports, and will not change .ts imports into .js imports. See the below link
microsoft/TypeScript#16577 (comment)

The developer was kind enough to provide the above solution, which does work, but is not a long term solution to the real issue: That we need to bundle the code.

tsc is a compiler, but it isn’t a bundler, which means that it does not do the following: Polyfill old code. We specify ES6 in our TSConfig, but tsc actually won’t handle cases where ES7+ code is used (e.g. Object.entries). This means Square cannot target browsers and instead the code may break with slightly older browsers (1+ year old) if Square is not careful.

Does this close any currently open issues?
Yes: #67

@alexandersmanning alexandersmanning requested a review from a team as a code owner February 19, 2022 18:16
@codecov-commenter
Copy link

Codecov Report

Merging #74 (4310645) into beta (79093ac) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##             beta      #74   +/-   ##
=======================================
  Coverage   82.45%   82.45%           
=======================================
  Files           2        2           
  Lines          57       57           
  Branches       15       15           
=======================================
  Hits           47       47           
  Misses         10       10           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 79093ac...4310645. Read the comment docs.

@alexandersmanning alexandersmanning merged commit 89ef742 into beta Feb 23, 2022
@alexandersmanning alexandersmanning deleted the amanning/fix-bundler-issues branch February 23, 2022 17:19
@github-actions
Copy link

🎉 This PR is included in version 1.0.0-beta.7 🎉

The release is available on:

Your semantic-release bot 📦🚀

@maxbeatty maxbeatty mentioned this pull request Mar 8, 2022
1 task
alexandersmanning added a commit that referenced this pull request Jul 12, 2022
* beta:
  Update websdk-types dependency (#81)
  chore(deps): bump ansi-regex from 3.0.0 to 3.0.1 in /examples/tsdx (#88)
  chore(deps): bump nanoid from 3.1.23 to 3.3.2 in /examples/tsdx (#87)
  chore(deps): bump minimist from 1.2.5 to 1.2.6 in /examples/tsdx (#86)
  chore(deps): bump trim-off-newlines from 1.0.1 to 1.0.3 (#78)
  chore(deps): bump node-fetch from 2.6.1 to 2.6.7 (#77)
  fix: add bundler to package (#74)
  chore(deps): bump @commitlint/config-conventional from 11.0.0 to 12.1.4 (#28)
  chore(deps): bump lint-staged from 10.5.4 to 11.0.0 (#24)
  chore(deps): bump @babel/preset-env from 7.12.17 to 7.14.7 (#23)
  chore(deps): bump pinst from 2.1.4 to 2.1.6 (#21)
  chore(deps): bump conventional-changelog-conventionalcommits (#20)
  chore(deps): bump eslint from 7.20.0 to 7.29.0 (#18)
  chore(deps): bump @commitlint/cli from 11.0.0 to 12.1.4 (#13)
  chore(deps): bump babel-jest from 26.6.3 to 27.0.2 (#19)
  chore(deps): bump semantic-release from 17.3.9 to 17.4.4 (#17)
  chore(deps): bump husky from 5.0.9 to 6.0.0 (#14)
@github-actions
Copy link

🎉 This PR is included in version 2.0.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

@abhipillai abhipillai mentioned this pull request Nov 30, 2022
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants