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

Revert typescript to 2.2.0, #235

Closed

Conversation

tomalec
Copy link
Collaborator

@tomalec tomalec commented Aug 8, 2019

the version that was not adding Object.defineProperty(exports, "__esModule", { value: true });
Therefore, resulting in module transpilable to one with unintended default export.

Fixes backward compatibility and #233

the version that was not adding `Object.defineProperty(exports, "__esModule", { value: true });`
Therefore, resulting in module transpilable to one with unintended default export.

Fixes backward compatibility and #233
@tomalec tomalec requested a review from warpech August 8, 2019 13:49
- as CommonJS (require)
- as import in Webpack
- as import in TypeScript with typings

code is backported from 3.x alpha (cec3d27)
@warpech
Copy link
Collaborator

warpech commented Aug 8, 2019

I just pushed one change, which adds tests for few external API use scenarios:

  • as CommonJS (require)
  • as import in Webpack
  • as import in TypeScript with typings

There is one known problem in TypeScript: The test in line

// const test_jsonpatch = jsonpatch.applyPatch(document, typedPatch).newDocument;
is commented out, because it fails since there is no default export in lib/duplex.js.

@tomalec would you care fixing that by adding an actual default export?

Amended cherry-pick @1de6122774251a9688a354e2d23a09029dbefa65

# Conflicts:
#	index.d.ts
#	index.mjs
#	index.ts
#	test/spec/webpack/importSpec.build.js
@tomalec
Copy link
Collaborator Author

tomalec commented Aug 8, 2019

Closing in favour of #236 it seems we have to export default anyway, to make TS happy, so we could keep using latest TS version.

@tomalec tomalec closed this Aug 8, 2019
@tomalec tomalec deleted the issues/233-revert-backward-incompatible-TS-upgrade branch August 8, 2019 17:49
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.

None yet

2 participants