-
Notifications
You must be signed in to change notification settings - Fork 795
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
refactor(deno): remove deno from codebase #3067
Conversation
This reverts commit 6d8a61d.
37aecc1
to
0c25ffc
Compare
typeof global !== 'undefined' && | ||
typeof require === 'function' && | ||
!!global.process && | ||
typeof __filename === 'string' && | ||
(!(global as any as Window).origin || typeof (global as any as Window).origin !== 'string'); | ||
|
||
export const OS_PLATFORM = IS_NODE_ENV ? process.platform : IS_DENO_ENV ? Deno.build.os : ''; |
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.
Deno.build.os
could return the string "windows"
which is why we can safely remove the check for it in the line below (in fact, the compiler yells at us because "windows"
is not a valid process.plaform
value)
I don't believe "windows"
was ever a valid process.platform
value, and couldn't find definitive proof of it having existing in https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node
@@ -2,7 +2,7 @@ import { OS_PLATFORM } from '../environment'; | |||
|
|||
export const EOL = '\n'; | |||
|
|||
export const platform = () => (OS_PLATFORM === 'windows' ? 'win32' : OS_PLATFORM); |
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.
We're able to do this as a result of this comment's context
Hi @rwaskiewicz! I'm one of Deno maintainers. I was just about to open a PR updating vendored Deno dependencies (namely I was very impressed how you solved Deno compatiblity using I'm very curious to hear your thoughts about the subject and problems that you faced, and to know if there's anything we could do to help out with those problems. |
Hey @bartlomieju! Thanks! Although I can’t take credit for the sys abstraction, it’s a certainly a handy one 🙂 With regards to Deno support in Stencil, we found that our Deno support (which had been marked as experimental by a previous maintainer) wasn’t being actively used. We polled our community, and weren’t able to surface any active users of Stencil + Deno. Additionally, when we tried to understand the current state of the functionality, we realized that it had broken some time ago, and hadn’t been noticed. The new team behind Stencil is relatively small, and is still getting ramped up on all of its inner workings. While we’d like to support as much as possible, we realized we have to be judicious about the functionality that we support. Due to the lack of usage, we felt that refurbishing Deno support was not going to serve the needs of our community. With all of that being said, if there is community desire to bring Deno support back, we’re absolutely up for it. That sys abstraction makes adding runtimes rather easy, Also, if you’re interested to hear more/talk further, I’m happy to do so! |
@rwaskiewicz thanks for the response!
That makes perfect sense and I completely understand this situation.
That sounds great; in parallel we're ramping out efforts to make codebases supporting Node and Deno at the same time easier to maintain and hopefully in the coming weeks we'll be able to provide the solution that would lower the maintenance burden. |
this commit removes an unnecessary generation of a `dependencies.json` file that would be created at build/release time in the root of the stencil repository. this file was originally used when stencil supported deno; however, support for that runtime was deprecated in #3067. as such, this file and its suppporting infrastructure is no longer needed. there are complimentary functions in the Node sys impl. however, those are no-ops, and need not be called in the cli. we do not remove them at this time for fear of introducing a breaking change. in this commit, we take the one utility function that is used in the build process today and relocated it to be spatially closer to its one caller
this commit removes an unnecessary generation of a `dependencies.json` file that would be created at build/release time in the root of the stencil repository. this file was originally used when stencil supported deno; however, support for that runtime was deprecated in #3067. as such, this file and its suppporting infrastructure is no longer needed. there are complimentary functions in the Node sys impl. however, those are no-ops, and need not be called in the cli. we do not remove them at this time for fear of introducing a breaking change. in this commit, we take the one utility function that is used in the build process today and relocated it to be spatially closer to its one caller
this commit removes an unnecessary generation of a `dependencies.json` file that would be created at build/release time in the root of the stencil repository. this file was originally used when stencil supported deno; however, support for that runtime was deprecated in #3067. as such, this file and its suppporting infrastructure is no longer needed. there are complimentary functions in the Node sys impl. however, those are no-ops, and need not be called in the cli. we do not remove them at this time for fear of introducing a breaking change. in this commit, we take the one utility function that is used in the build process today and relocated it to be spatially closer to its one caller
To Folks Who Would Like Deno to be Supported
Please 👍 the summary of the RFC located here. Or leave a comment explaining your use case for Deno (but please do not leave a comment with just '👍')
Pull request checklist
Please check if your PR fulfills the following requirements:
npm run build
) was run locally and any changes were pushednpm test
) were run locally and passednpm run test.karma.prod
) were run locally and passednpm run prettier
) was run locally and passedPull request type
Please check the type of change your PR introduces:
What is the current behavior?
We have a good amount of code for Deno, which we sunset recently. It doesn't actually function today.
GitHub Issue Number: N/A
What is the new behavior?
Same as it does today 😆 This just rips Deno out of the Stencil repo
Does this introduce a breaking change?
Testing
In addition to CI based tests:
npm init stencil
test/browser-compiler
Other information