Skip to content

Remove URL and URLSearchParams from nodeJS global#25356

Merged
rbuckton merged 1 commit intomasterfrom
node10NoGlobalURL
Apr 27, 2018
Merged

Remove URL and URLSearchParams from nodeJS global#25356
rbuckton merged 1 commit intomasterfrom
node10NoGlobalURL

Conversation

@rbuckton
Copy link
Copy Markdown
Collaborator

This reverts the change that adds URL and URLSearchParams to the global scope in NodeJS due to a collision with DOM types when both are used..

Fixes #25342.

@rbuckton rbuckton mentioned this pull request Apr 27, 2018
2 tasks
@typescript-bot
Copy link
Copy Markdown
Contributor

typescript-bot commented Apr 27, 2018

@rbuckton Thank you for submitting this PR!

🔔 @parambirs @tellnes @WilcoBakker @octo-sniffle @smac89 @Flarna @mwiktorczyk @wwwy3y3 @DeividasBakanas @kjin @alvis @OliverJAsh @eps1lon @Hannes-Magnusson-CK @jkomyno @ajafff @hoo29 @n-e - please review this PR in the next few days. Be sure to explicitly select Approve or Request Changes in the GitHub UI so I know what's going on.

If no reviewer appears after a week, a DefinitelyTyped maintainer will review the PR instead.

@typescript-bot typescript-bot added Popular package This PR affects a popular package (as counted by NPM download counts). The Travis CI build failed labels Apr 27, 2018
@typescript-bot
Copy link
Copy Markdown
Contributor

typescript-bot commented Apr 27, 2018

@rbuckton The Travis CI build failed! Please review the logs for more information.

Once you've pushed the fixes, the build will automatically re-run. Thanks!

@rbuckton
Copy link
Copy Markdown
Collaborator Author

@Andy-MS, the push build seems to be failing in runWithListeningChildProcess again:

Error: Something went wrong in runWithListeningChildProcesses
    at fail (/home/travis/build/DefinitelyTyped/DefinitelyTyped/node_modules/types-publisher/src/util/util.ts:379:11)
    at ChildProcess.child.on (/home/travis/build/DefinitelyTyped/DefinitelyTyped/node_modules/types-publisher/src/util/util.ts:367:6)
    at emitNone (events.js:106:13)
    at ChildProcess.emit (events.js:208:7)
    at finish (internal/child_process.js:757:14)
    at _combinedTickCallback (internal/process/next_tick.js:131:7)
    at process._tickCallback (internal/process/next_tick.js:180:9)

@typescript-bot
Copy link
Copy Markdown
Contributor

@rbuckton The Travis CI build failed! Please review the logs for more information.

Once you've pushed the fixes, the build will automatically re-run. Thanks!

@nhhockeyplayer
Copy link
Copy Markdown

nhhockeyplayer commented Apr 30, 2018

waiting patiently on this one
is there a way to be notified?
i keep trying my build and i fails
or i try this
and repeat build

npm install @types/node@latest -D

@nhhockeyplayer
Copy link
Copy Markdown

nhhockeyplayer commented Apr 30, 2018

after updating

npm install @types/node@latest -D

i get the following installed

"@types/node": "6.0.107",

i then try to compile my server and it still wont build

C:\apache-tomcat-9.0.0.M17\webapps\ROOT\api\src\server>tsc
../../node_modules/@types/koa/index.d.ts(24,57): error TS2307: Cannot find module 'http2'.
../../node_modules/@types/koa/index.d.ts(105,14): error TS2694: Namespace '"url"' has no exported member 'URL'.

C:\apache-tomcat-9.0.0.M17\webapps\ROOT\api\src\server>


how are we to resolve these wide spread build errors

RxJS on the client side still fails to build with import problems RxJS 6

@rbuckton
Copy link
Copy Markdown
Collaborator Author

@nhhockeyplayer try npm install @types/[email protected]. For some reason, "latest" is pinned at 6.0.107. I'm asking the team if there's a reason for that.

@ulrichb
Copy link
Copy Markdown
Contributor

ulrichb commented Sep 7, 2018

Okay. But now I cannot use the global URL/URLSearchParams in my node application 😢

I have to import it from url, which is not okay for client/server-shared code parts.

Can we anyhow make URL/URLSearchParams global again plus avoid the duplicate identifier issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Other Approved This PR was reviewed and signed-off by a community member. Popular package This PR affects a popular package (as counted by NPM download counts).

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants