Skip to content

Commit f81068d

Browse files
Merge pull request #1400 from opencomponents/add-url-crypto
add crypto and url globals
2 parents 92e485a + a65bfab commit f81068d

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

.github/workflows/node.js.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# This workflow will do a clean install of node dependencies, cache/restore them, build the source code and run tests across different versions of node
2-
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
2+
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs
33

44
name: Node.js CI
55

@@ -19,11 +19,11 @@ jobs:
1919
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
2020

2121
steps:
22-
- uses: actions/checkout@v2
22+
- uses: actions/checkout@v4
2323
- name: Use Node.js ${{ matrix.node-version }}
24-
uses: actions/setup-node@v2
24+
uses: actions/setup-node@v4
2525
with:
2626
node-version: ${{ matrix.node-version }}
2727
cache: 'npm'
28-
- run: npm install
28+
- run: npm ci
2929
- run: npm test

src/registry/routes/helpers/get-component.ts

+3
Original file line numberDiff line numberDiff line change
@@ -579,6 +579,9 @@ export default function getComponent(conf: Config, repository: Repository) {
579579
Date,
580580
Symbol,
581581
eval: undefined,
582+
URL: globalThis?.URL,
583+
URLSearchParams: globalThis?.URLSearchParams,
584+
crypto: globalThis?.crypto,
582585
fetch: globalThis?.fetch
583586
};
584587

0 commit comments

Comments
 (0)