Skip to content
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

Use the term origin to refer to scheme://host #493

Merged
merged 1 commit into from
Jan 11, 2024
Merged

Conversation

visnup
Copy link
Member

@visnup visnup commented Jan 11, 2024

Follow up to #490. Renames usages of "host" when referring to scheme://host to "origin."

I noticed the tests for this weren't really working with deepEqual on URL objects:

> require("assert").deepEqual(new URL("https://example.com"), new URL("http://foo.com"))
undefined
> require("assert").equal(String(new URL("https://example.com")), String(new URL("http://foo.com")))
Uncaught AssertionError [ERR_ASSERTION]: 'https://example.com/' == 'http://foo.com/'
    at REPL20:1:19
    at ContextifyScript.runInThisContext (node:vm:121:12)
    at REPLServer.defaultEval (node:repl:599:22)
    at bound (node:domain:432:15)
    at REPLServer.runBound [as eval] (node:domain:443:12)
    at REPLServer.onLine (node:repl:929:10)
    at REPLServer.emit (node:events:526:35)
    at REPLServer.emit (node:domain:488:12)
    at [_onLine] [as _onLine] (node:internal/readline/interface:416:12)
    at [_line] [as _line] (node:internal/readline/interface:887:18) {
  generatedMessage: true,
  code: 'ERR_ASSERTION',
  actual: 'https://example.com/',
  expected: 'http://foo.com/',
  operator: '=='
}

@visnup visnup requested review from mcglincy and mythmon January 11, 2024 01:53
@visnup visnup force-pushed the visnup/host-origin branch from d2c1b5e to 7042e8c Compare January 11, 2024 01:57
@visnup visnup force-pushed the visnup/host-origin branch from 7042e8c to 107d468 Compare January 11, 2024 01:57
@visnup visnup merged commit 9488134 into main Jan 11, 2024
2 checks passed
@visnup visnup deleted the visnup/host-origin branch January 11, 2024 04:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants