-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
support deno #2745
support deno #2745
Conversation
✅ Deploy Preview for stylus-docs canceled.
|
I forgot to add that this is a very minor change (in face of the user) as the API is unmodified and everything (including tests) works exactly as expected. |
anyone? |
Can you add github action ci for stylus with deno environment ? |
✅ Deploy Preview for stylus-docs ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
@iChenLei ptal |
@iChenLei fixed |
this solution works for: - newer node versions (12+) and deno where `globalThis` is defined - old node versions (where `global` is defined)
Bumps [undici](https://github.com/nodejs/undici) from 5.10.0 to 5.19.1. - [Release notes](https://github.com/nodejs/undici/releases) - [Commits](nodejs/undici@v5.10.0...v5.19.1) --- updated-dependencies: - dependency-name: undici dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* ci: update nodejs matrix test suite * Update ci.yml
Fix capitalization of Node.js, CSS, Stylus (CSS is already plural so CSSs is not really correct) Correct minor language errors
Co-authored-by: Taras Polovyi <taras.polovyi@grammarly.com>
Bumps [json5](https://github.com/json5/json5) from 2.2.1 to 2.2.3. - [Release notes](https://github.com/json5/json5/releases) - [Changelog](https://github.com/json5/json5/blob/main/CHANGELOG.md) - [Commits](json5/json5@v2.2.1...v2.2.3) --- updated-dependencies: - dependency-name: json5 dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 2.9.15 to 2.9.16. - [Release notes](https://github.com/vitejs/vite/releases) - [Changelog](https://github.com/vitejs/vite/blob/v2.9.16/packages/vite/CHANGELOG.md) - [Commits](https://github.com/vitejs/vite/commits/v2.9.16/packages/vite) --- updated-dependencies: - dependency-name: vite dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
@iChenLei I believe stylus's dependencies do not support older versions of node anymore. In the logs you can see
also The |
@iChenLei ptal |
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.
I have a question: why not directly convert function
into class
(only needing Node.js v4+), instead of using setPrototypeOf
? Plus, you don't need to care about the issues with @adobe/css-tools
.
that can be done yes, I was surprised why stylus does this too. since it'll be a huge change, I'll be working on a separate PR. stay tuned |
So, can we close this PR ? |
yes. |
What:
This PR allows
stylus
to work ondeno
, an alternative to Node.JSWhy:
Deno is gaining traction, and I personally use stylus, so I wanted to contrinue using stylus with Deno (after I switched to it from Node)
How:
The fix is two-steps:
Object.setPrototypeOf
instead of the deprecated__proto__
(which Deno doesn't support)boolean
node that called theBoolean
function, causing deno to run into an infinite loop as it was calling the constructor from the constructor in a recursive way.I THINK THIS IS OKAY, BUT PLEASE VERIFY
Checklist:
May I recommend moving to ES6 classes (would help) in the future, instead of modifying the prototype chain manually as this results in code reliability & performance issues.