orta

orta

I help people build dev ecosystems. Current: TypeScript. Contributed to: Shiki, Shiki Twoslash, Danger, CocoaPods, Jest, GraphQL, RxSwift & Svelte.

Member Since 12 years ago

Microsoft on TypeScript, Huddersfield / NYC / Dublin

Experience Points
5k
follower
Lessons Completed
104
follow
Lessons Completed
389
stars
Best Reply Awards
899
repos

4176 contributions in the last year

Pinned
⚡ ⚠️ Stop saying "you forgot to …" in code review
⚡ TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
⚡ The Cocoa Dependency Manager.
⚡ The Art World in Your Pocket or Your Trendy Tech Company's Tote, Artsy's mobile app.
Activity
Dec
4
1 day ago
Activity icon
issue

orta issue comment DefinitelyTyped/DefinitelyTyped

orta
orta

fix(jsdom): reference `dom` lib in source

Please fill in this template.

Select one of these and delete the others:

If changing an existing definition:

  • Provide a URL to documentation or source code which provides context for the suggested changes: <>
  • If this PR brings the type definitions up to date with a new version of the JS library, update the version number in the header.

See https://github.com/facebook/jest/issues/12098

Having some DOM types that does not pollute the global namespace would be better, but 🤷

orta
orta

We could be waiting for an unknown amount of time for a separate import of those types without the globals, its a constant debate in the dom-lib-generator chat room in discord

push

orta push microsoft/TypeScript-Website

orta
orta

Slightly enhance awaited docs

orta
orta

Merge pull request #2177 from holgergp/Awaited-docs

Slightly improve awaited docs

commit sha: b5eee6ac50db23bd090043a1caf1fd538eefe5c1

push time in 12 hours ago
pull request

orta pull request microsoft/TypeScript-Website

orta
orta

Slightly improve awaited docs

Hi all!

thanks for the awesome new release!

I stumbled over the docs of the new Awaited-Type. And to be honest, I do not quite understand those. This PR tries to "fix" the second-to-last paragraph, where I fail to understand its intention completely 🤷‍♂️ . But that may just be my lack of english mother tongue.

Cheers

Holger

Activity icon
issue

orta issue comment microsoft/TypeScript-Website

orta
orta

Slightly improve awaited docs

Hi all!

thanks for the awesome new release!

I stumbled over the docs of the new Awaited-Type. And to be honest, I do not quite understand those. This PR tries to "fix" the second-to-last paragraph, where I fail to understand its intention completely 🤷‍♂️ . But that may just be my lack of english mother tongue.

Cheers

Holger

orta
orta

Cool, looks reasonable to me 👍🏻

Activity icon
issue

orta issue facebook/relay

orta
orta

[relay 13] Watchman queries from compiler not supported on latest (homebrew) watchman

I updated watchman to the latest homebrew build, which is v2021.11.15.00 (there has been one new version since then, but its very difficult to know what changed as an outsider) but this query fails:

❯ yarn relay-compiler --schema ../.redwood/schema.graphql
yarn run v1.22.17
$ /Users/ortatherox/dev/redwood/relay-redwood-app-example/node_modules/.bin/relay-compiler --schema ../.redwood/schema.graphql
querying files to compile...
[ERROR] Watchman error: The watchman server reported an error: "failed to parse query: must use ["suffix", "suffixstring"]", while executing command: QueryRequest(
    "query",
    "/Users/ortatherox/dev/redwood/relay-redwood-app-example",
    QueryRequestCommon {
        glob: None,
        glob_noescape: false,
        glob_includedotfiles: false,
        path: Some(
            [
                RecursivePath(
                    "",
                ),
            ],
        ),
        suffix: None,
        since: None,
        relative_root: Some(
            "web",
        ),
        expression: Some(
            All(
                [
                    FileType(
                        Regular,
                    ),
                    Any(
                        [
                            All(
                                [
                                    All(
                                        [
                                            Suffix(
                                                [
                                                    "ts",
                                                    "tsx",
                                                ],
                                            ),
                                            DirName(
                                                DirNameTerm {
                                                    path: "",
                                                    depth: None,
                                                },
                                            ),
                                        ],
                                    ),
                                    Not(
                                        Any(
                                            [
                                                Match(
                                                    MatchTerm {
                                                        glob: "**/node_modules/**",
                                                        wholename: true,
                                                        include_dot_files: false,
                                                        no_escape: false,
                                                    },
                                                ),
                                                Match(
                                                    MatchTerm {
                                                        glob: "**/__mocks__/**",
                                                        wholename: true,
                                                        include_dot_files: false,
                                                        no_escape: false,
                                                    },
                                                ),
                                                Match(
                                                    MatchTerm {
                                                        glob: "**/__generated__/**",
                                                        wholename: true,
                                                        include_dot_files: false,
                                                        no_escape: false,
                                                    },
                                                ),
                                            ],
                                        ),
                                    ),
                                ],
                            ),
                            Name(
                                NameTerm {
                                    paths: [
                                        "schema.graphql",
                                    ],
                                    wholename: true,
                                },
                            ),
                        ],
                    ),
                ],
            ),
        ),
        fields: [
            "name",
            "exists",
        ],
        empty_on_fresh_instance: false,
        omit_changed_files: false,
        fail_if_no_saved_state: false,
        case_sensitive: false,
        sync_timeout: Default,
        dedup_results: false,
        lock_timeout: None,
        request_id: None,
    },
)
[ERROR] Compilation failed.
[ERROR] Watchman error: The watchman server reported an error: "failed to parse query: must use ["suffix", "suffixstring"]", while executing command: QueryRequest(
    "query",
    "/Users/ortatherox/dev/redwood/relay-redwood-app-example",
    QueryRequestCommon {
        glob: None,
        glob_noescape: false,
        glob_includedotfiles: false,
        path: Some(
            [
                RecursivePath(
                    "",
                ),
            ],
        ),
        suffix: None,
        since: None,
        relative_root: Some(
            "web",
        ),
        expression: Some(
            All(
                [
                    FileType(
                        Regular,
                    ),
                    Any(
                        [
                            All(
                                [
                                    All(
                                        [
                                            Suffix(
                                                [
                                                    "ts",
                                                    "tsx",
                                                ],
                                            ),
                                            DirName(
                                                DirNameTerm {
                                                    path: "",
                                                    depth: None,
                                                },
                                            ),
                                        ],
                                    ),
                                    Not(
                                        Any(
                                            [
                                                Match(
                                                    MatchTerm {
                                                        glob: "**/node_modules/**",
                                                        wholename: true,
                                                        include_dot_files: false,
                                                        no_escape: false,
                                                    },
                                                ),
                                                Match(
                                                    MatchTerm {
                                                        glob: "**/__mocks__/**",
                                                        wholename: true,
                                                        include_dot_files: false,
                                                        no_escape: false,
                                                    },
                                                ),
                                                Match(
                                                    MatchTerm {
                                                        glob: "**/__generated__/**",
                                                        wholename: true,
                                                        include_dot_files: false,
                                                        no_escape: false,
                                                    },
                                                ),
                                            ],
                                        ),
                                    ),
                                ],
                            ),
                            Name(
                                NameTerm {
                                    paths: [
                                        "schema.graphql",
                                    ],
                                    wholename: true,
                                },
                            ),
                        ],
                    ),
                ],
            ),
        ),
        fields: [
            "name",
            "exists",
        ],
        empty_on_fresh_instance: false,
        omit_changed_files: false,
        fail_if_no_saved_state: false,
        case_sensitive: false,
        sync_timeout: Default,
        dedup_results: false,
        lock_timeout: None,
        request_id: None,
    },
)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

I wondered if the prefix was src or artifactDirectory not being set maybe, but:

yarn relay-compiler --schema ../.redwood/schema.graphql --src ./src --artifactDirectory src/components/__generated__

Also fails, if you want a repro: https://github.com/orta/relay-redwood-app-example/tree/relay_13

Activity icon
created branch
createdAt 18 hours ago
Activity icon
issue

orta issue facebook/relay

orta
orta

[relay13] Config: Schema not respected from settings?

My folder structure looks roughly like:

/
 .redwood
   schema.graphql

  web
   package.json
     src
       ...

Which means I'd use this config:

 "relay": {
    "schema": "../.redwood/schema.graphql",
  },

in web/package.json, but it seems to be ignored:

❯ yarn relay-compiler
yarn run v1.22.17
$ /Users/ortatherox/dev/redwood/relay-redwood-app-example/node_modules/.bin/relay-compiler
[ERROR] Config `/Users/ortatherox/dev/redwood/relay-redwood-app-example/web/package.json` is invalid:
 - The `schema` configured for project `default` does not exist at `/Users/ortatherox/dev/redwood/relay-redwood-app-example/web/schema.graphql`.

I wondered if it was the relative path, but the absolute path also didn't work. Changing my command to yarn relay-compiler --schema ../.redwood/schema.graphql worked though.

Activity icon
issue

orta issue facebook/relay

orta
orta

[relay 13] Show the version number in --version

Heh, was just looking for confirmation everything works:

❯ yarn relay-compiler --version
yarn run v1.22.17
$ /Users/ortatherox/dev/redwood/relay-redwood-app-example/node_modules/.bin/relay-compiler --version
Relay Compiler 0.0.0
✨  Done in 0.88s.

Definitely 13 rc-0 though:

❯ yarn why relay-compiler
yarn why v1.22.17
[1/4] 🤔  Why do we have the module "relay-compiler"...?
[2/4] 🚚  Initialising dependency graph...
[3/4] 🔍  Finding dependency...
[4/4] 🚡  Calculating file sizes...
=> Found "[email protected]"
info Reasons this module exists
   - "_project_#web" depends on it
   - Hoisted from "_project_#web#relay-compiler"
   - Hoisted from "_project_#@redwoodjs#core#@redwoodjs#internal#@graphql-codegen#typescript-operations#@graphql-codegen#visitor-plugin-common#@graphql-tools#relay-operation-optimizer#relay-compiler"
info Disk size without dependencies: "37.83MB"
info Disk size with unique dependencies: "37.83MB"
info Disk size with transitive dependencies: "37.83MB"
info Number of shared dependencies: 0
✨  Done in 1.58s.
Dec
3
2 days ago
Activity icon
issue

orta issue CocoaPods/CocoaPods

orta
orta

GTR

Report

What did you do?

ℹ Please replace these two lines with what you did.
e.g. Run pod install

What did you expect to happen?

ℹ Please replace these two lines with what you expected to happen.
e.g. Install all pod dependencies correctly.

What happened instead?

ℹ Please replace these two lines with of what happened instead.
e.g. Pod A is missing the subspec B for target C.

CocoaPods Environment

ℹ Please replace these two lines with the output of pod env. e.g. via pod env | pbcopy

Project that demonstrates the issue

ℹ Please link to a project we can download that reproduces the issue. You can delete this section if your issue is unrelated to build problems, i.e. it's only an issue with CocoaPods the tool.

pull request

orta pull request mrdoob/three.js

orta
orta

Make headers stand out in API reference

Before: (Look at "Math") Screen Shot 2021-12-03 at 9 33 05 AM

After: Screen Shot 2021-12-03 at 9 32 48 AM

Description: Makes it more obvious what is a header vs a clickable example.

push

orta push orta/three.js

orta
orta

Make headers stand out in API reference

commit sha: 66116675022c38480bbe312d65d3f17f2e0f7354

push time in 1 day ago
Activity icon
fork

orta forked mrdoob/three.js

⚡ JavaScript 3D Library.
orta MIT License Updated
fork time in 1 day ago
Dec
2
3 days ago
Activity icon
issue

orta issue shikijs/shiki

orta
orta

Load theme from JS theme object (not file path)

I'd like to import my theme as JSON (i.e. import theme from 'path/to/theme') during the build for my website, rather than reference the theme path at runtime (via shiki.loadTheme`). That way I don't need to be aware of the intricacies of where my particular framework/build tools end up putting the theme.

I think this could be accomplished by exporting the toShikiTheme function from the package.

What I want:

import theme from './night-owl.json'

const higligher = shiki.getHighlighter({ theme: shiki.toShikiTheme(theme) })
Activity icon
issue

orta issue comment shikijs/shiki

orta
orta

Load theme from JS theme object (not file path)

I'd like to import my theme as JSON (i.e. import theme from 'path/to/theme') during the build for my website, rather than reference the theme path at runtime (via shiki.loadTheme`). That way I don't need to be aware of the intricacies of where my particular framework/build tools end up putting the theme.

I think this could be accomplished by exporting the toShikiTheme function from the package.

What I want:

import theme from './night-owl.json'

const higligher = shiki.getHighlighter({ theme: shiki.toShikiTheme(theme) })
orta
orta

0.9.14 has it 👍🏻

push

orta push spaceinvadev/shiki

orta
orta

feat: add alternight theme

orta
orta
orta
orta

Merge pull request #268 from spaceinvadev/add-alternight-theme

feat: add alternight theme

orta
orta

Merge branch 'main' into add-minimus-theme

commit sha: 81be0c1edab1b468a2d5186ec140668ee988c2f2

push time in 2 days ago
push

orta push shikijs/shiki

orta
orta

feat: add alternight theme

orta
orta

Merge pull request #268 from spaceinvadev/add-alternight-theme

feat: add alternight theme

commit sha: 1c6593a9f45ac9d0fff6a3a1c298221cc4e0ffec

push time in 2 days ago
pull request

orta pull request shikijs/shiki

orta
orta

feat: add alternight theme

Add my AlterNight VS Code theme (https://github.com/spaceinvadev/alternight-vscode-theme).

Activity icon
issue

orta issue comment shikijs/shiki

orta
orta

Load theme from JS theme object (not file path)

I'd like to import my theme as JSON (i.e. import theme from 'path/to/theme') during the build for my website, rather than reference the theme path at runtime (via shiki.loadTheme`). That way I don't need to be aware of the intricacies of where my particular framework/build tools end up putting the theme.

I think this could be accomplished by exporting the toShikiTheme function from the package.

What I want:

import theme from './night-owl.json'

const higligher = shiki.getHighlighter({ theme: shiki.toShikiTheme(theme) })
Activity icon
issue

orta issue comment microsoft/TypeScript-DOM-lib-generator

orta
orta

`DOMStringList` missing iterator method

TypeScript blocks using [...location.ancestorOrigins] with the error

Type 'DOMStringList' must have a '[Symbol.iterator]()' method that returns an iterator. ts(2488)

However, it is present in Chrome: image

orta
orta

We've got a big chunk of checks in getCannotFindNameDiagnosticForName inside the compiler, (no point offering a link to the checker) but this can probably be added to that list. You have to manually set up your lib settings like this to trigger this case as the iteration version would be added by default if you include es2015/es6+ in your target

pull request

orta merge to microsoft/TypeScript

orta
orta

Pin chalk to ^4.1

This limits the version of chalk we use to ^4.1.2 since [email protected] is now ESM only.

Activity icon
issue

orta issue DefinitelyTyped/DefinitelyTyped

orta
orta

@types/roslib: `Topic.unsubscribe` appears to have incorrect type

https://github.com/DefinitelyTyped/DefinitelyTyped/blob/e22878ad902ae10e34ca19c21d006757f21527bd/types/roslib/index.d.ts#L418

Using these types in a work project, I noticed the definition for Topic.unsubscribe appears to be incorrect. Specifically, the definition doesn't allow you to pass in the same callback you passed to Topic.subscribe; rather, it would require you to pass in a function that accepts a function with the same shape as what you passed to Topic.subscribe which is not how roslib actually handle unsubscribing and wouldn't actually work since a wrapping function wouldn't have the same identity as the original subscription function.

I discovered this issue when TS wouldn't let me pass the same callback to unsubscribe that I passed to subscribe.

The solution to this should be to require the optional callback param to unsubscribe to have the same shape as the param for subscribe, like so:

unsubscribe(callback?: (message: TMessage) => void): void;
Activity icon
issue

orta issue DefinitelyTyped/DefinitelyTyped

orta
orta

bl.tel

Demo Directory/ demo.js demo.html demo.css demo.details

Activity icon
issue

orta issue DefinitelyTyped/DefinitelyTyped

orta
orta

@types/jest issue

warn Package @types/jest has been ignored because it contains invalid configuration. Reason: Package subpath './package.json' is not defined by "exports" in ./node_modules/@types/jest/package.json

"@types/jest": "^27.0.3",

Not sure what this means.

Activity icon
issue

orta issue DefinitelyTyped/DefinitelyTyped

orta
orta

`chrome.runtime.onInstall` callback parameter `details.reason` is typed as `string` (should be `OnInstalledReason`)

When checking the online documentation for chrome.runtime.onInstalled, I see that the callback argument is typed as:

interface object {
  id?: string;
  previousVersion?: string;
  reason: OnInstalledReason;
}

(details: object) => void

Where onInstalledReason should be an enum type (based on the documentation):

type onInstallReason = "install" | "update" | "chrome_update" | "shared_module_update";

However, when looking at the actual type definitions found in node_modules, I see (comments excluded):

// node_modules/@types/chrome/index.d.ts

export interface InstalledDetails {
    reason: string;
    previousVersion?: string | undefined;
    id?: string | undefined;
}

In the above, InstalledDetails.reason is typed as a string, which does not provide intellisense like an enum type would. Furthermore, I cannot seem to find the OnInstalledReason enum type in the file.

I am using @types/[email protected] but the same is present in v0.0.164 (latest)

Would a PR for this be helpful?

Previous