-
Notifications
You must be signed in to change notification settings - Fork 12
Fix Angular SSR in Cloudflare Worker environments #96
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
Draft
Copilot
wants to merge
23
commits into
main
Choose a base branch
from
copilot/fix-95
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from 21 commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
a0d54af
Initial plan for issue
Copilot 8292280
Fix Angular SSR in Cloudflare Worker issue
Copilot 39a708c
Update documentation and version for SSR compatibility
Copilot 3859b45
Change version date from May 2024 to Unreleased in RELEASES.md
Copilot 1fe54b0
Optimize SSR support by using setInstanceFunc flag instead of early r…
Copilot 4af5bb7
Revert version number back to 2.0.3
Copilot a3d8f27
Remove test files from PR
Copilot 48c624c
Add try/catch in _instFuncProxy for additional SSR protection
Copilot 9820de1
Add additional try/catch blocks for Cloudflare Worker protection
Copilot ed22960
Use helpers from ts-utils for server-side detection and revert try-catch
Copilot 6374c7e
Revert package.json ordering changes
Copilot c541a2e
Update ts-utils dependency range to >=0.12.4 <1.0.0 per review feedback
Copilot a668e3a
Merge branch 'main' into copilot/fix-95
MSNev 507dad4
Replace hasNavigator() with !!getNavigator() per review feedback
Copilot 32afc77
Address PR review feedback
Copilot fc1fbd0
Refine detection of restricted environments for Cloudflare Workers
Copilot 61dc48c
Remove generated test files excluded by .gitignore
Copilot 3e1905a
Replace Object.defineProperty with alternative property operations
Copilot 1f6763a
Remove _isRestrictedEnvironment function as requested
Copilot 095f37d
Restore original devDependencies order in package.json
Copilot d3d60f4
Remove test files excluded by .gitignore from PR
Copilot cdbc572
Update documentation to reflect current implementation approach
Copilot 5509384
Remove Restricted Environment Support section from README.md
Copilot File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,14 @@ | ||
# Releases | ||
|
||
## 2.0.4 (Unreleased) | ||
|
||
### Changes | ||
|
||
- #95 [BUG] AppInsights breaks Angular SSR in Cloudflare Worker | ||
- Added support for restricted JavaScript environments, including Cloudflare Workers | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Update |
||
- Modified the `dynamicProto` function to detect environments where property redefinition is restricted | ||
- This ensures compatibility with Angular SSR, Cloudflare Workers, and other restricted environments | ||
|
||
## 2.0.3 (Jan 11th, 2024) | ||
|
||
Blocks a medium level prototype pollution vulnerability. | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Update this documentation as it's not explicitly doing this anymore
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've updated the documentation in cdbc572. Changed the section title to "Restricted Environment Support" and updated the description to accurately reflect the current implementation that handles potential property manipulation errors in restricted environments rather than explicitly detecting server-side rendering.