Skip to content
This repository has been archived by the owner on Jul 2, 2024. It is now read-only.

Fixed node compatibility #13

Merged
merged 1 commit into from
Jun 12, 2021
Merged

Fixed node compatibility #13

merged 1 commit into from
Jun 12, 2021

Conversation

rmburg
Copy link
Contributor

@rmburg rmburg commented Jun 10, 2021

As far as I can tell, the old dependency is a fork of the original text-encoding-shim with a patch that fixed compatibility with node.
The fork has been unmaintained for three years.
Since then, the original has been updated, making the fork obsolete.
Also, newer node versions have deprecated GLOBAL in favor of global.
This breaks compatibility with the fork and causes demos.tf to crash on node v16.2.0. The original has been updated to fix this incompatibility, see this commit.

As far as I can tell, the old dependency is a fork of the original text-encoding-shim with a patch that fixed compatibility with node.
The fork has been unmaintained for three years.
Since then, the original has been updated, making the fork obsolete.
Also, newer node versions have deprecated `GLOBAL` in favor of `global`.
This breaks compatibility with the fork and causes demos.tf to crash on node v16.2.0. The original has been updated to fix this incompatibility, see commit
https://gitlab.com/PseudoPsycho/text-encoding-shim/-/commit/142068f3a20b7038ab201fb49a4128198399b94f .
@icewind1991 icewind1991 merged commit b0f024d into demostf:master Jun 12, 2021
@icewind1991
Copy link
Collaborator

thanks

@rmburg
Copy link
Contributor Author

rmburg commented Jun 12, 2021

Thanks for merging. Please push this to yarn/npm if possible.

@rmburg
Copy link
Contributor Author

rmburg commented Jun 20, 2021

I need this fix for a project of mine. Is it possible to push this to yarn?

@icewind1991
Copy link
Collaborator

done

@rmburg
Copy link
Contributor Author

rmburg commented Jun 21, 2021

thanks a lot!

@rmburg
Copy link
Contributor Author

rmburg commented Jun 21, 2021

It looks like the new version on yarn is missing the build directory...
It fails to install.

@rmburg
Copy link
Contributor Author

rmburg commented Jun 21, 2021

Output from yarn install:

Module not found: Error: Can't resolve './build/Demo' in '[my project path]/node_modules/@demostf/demo.js'
resolve './build/Demo' in '[my project path]/node_modules/@demostf/demo.js'
  using description file: [my project path]/node_modules/@demostf/demo.js/package.json (relative path: .)
    Field 'browser' doesn't contain a valid alias configuration
    using description file: [my project path]/node_modules/@demostf/demo.js/package.json (relative path: ./build/Demo)
      no extension
        Field 'browser' doesn't contain a valid alias configuration
        [my project path]/node_modules/@demostf/demo.js/build/Demo doesn't exist
      .js
        Field 'browser' doesn't contain a valid alias configuration
        [my project path]/node_modules/@demostf/demo.js/build/Demo.js doesn't exist
      .jsx
        Field 'browser' doesn't contain a valid alias configuration
        [my project path]/node_modules/@demostf/demo.js/build/Demo.jsx doesn't exist
      .json
        Field 'browser' doesn't contain a valid alias configuration
        [my project path]/node_modules/@demostf/demo.js/build/Demo.json doesn't exist
      .ts
        Field 'browser' doesn't contain a valid alias configuration
        [my project path]/node_modules/@demostf/demo.js/build/Demo.ts doesn't exist
      .tsx
        Field 'browser' doesn't contain a valid alias configuration
        [my project path]/node_modules/@demostf/demo.js/build/Demo.tsx doesn't exist
      as directory
        [my project path]/node_modules/@demostf/demo.js/build/Demo doesn't exist
 @ dll renderer renderer[0]

@icewind1991
Copy link
Collaborator

it's been to long since I've published any js package, please try again I think I did it properly this time

@rmburg
Copy link
Contributor Author

rmburg commented Jun 22, 2021

Thanks a lot for your time.
Now it installs without errors.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants