profile
viewpoint
Orta Therox orta Microsoft on TypeScript NYC / Huddersfield https://orta.io I help people build dev ecosystems. Current: TypeScript. Contributed to: Danger, CocoaPods, GraphQL, RxSwift & Svelte.

danger/danger 4088

🚫 Stop saying "you forgot to …" in code review (in Ruby)

BendingSpoons/tempura-swift 546

A holistic approach to iOS development, inspired by Redux and MVVM

ashfurrow/Nimble-Snapshots 277

Nimble matchers for FBSnapshotTestCase.

dblock/ARTiledImageView 221

Display, pan and deep zoom with tiled images on iOS.

ashfurrow/second_curtain 127

Upload failing iOS snapshot tests cases to S3

dblock/ios-snapshot-test-case-expecta 92

Expecta matchers for ios-snapshot-test-case.

ashfurrow/Forgeries 83

Helper methods for testing iOS code

bamlab/dev-standards 71

https://bamtech.gitbooks.io/dev-standards/

alloy/AxeMode 60

:monkey::wrench: for Xcode

push eventorta/nightly-profile-updater

Orta

commit sha f15363a551ec92f01b3cc074f562dda1545f180f

Adds wrappers for sanitzing the title too

view details

push time in 11 hours

push eventorta/orta

Orta

commit sha 3ee03baf7ed4b8da0b50bfb59149abe93089104d

Use full URL

view details

push time in 11 hours

push eventorta/orta

Orta

commit sha 19a4480c90c163f1c8a323bf6f51e16583923808

Taken a stab at a profile image

view details

push time in 11 hours

push eventmicrosoft/TypeScript-Website

Alexander Kjäll

commit sha fbf96ada3b663b3a726a7260ebd778e68e804b35

make the tutorial compatible with redux 4 The createStore function have been expanded to take four template arguments, and the initial state injection have been moved to the reducer

view details

Orta Therox

commit sha f96e5e14ed9eaee007b8d6a872569bd0c8230662

Merge pull request #707 from alexanderkjall/redux-4 make the tutorial compatible with redux 4

view details

Orta

commit sha 6e4e90643c94f2a5e417d533dea4149a3bd20296

Adds the ATA acquired d.ts files as monaco models so that they show up in peek Co-authored-by: Wesley Wigham <wwigham@gmail.com>

view details

Orta

commit sha 7813d06835c7e91cda938beeafab22fbba810e49

Merge branch 'v2' of https://github.com/microsoft/TypeScript-website into v2

view details

Orta

commit sha f688d10fd63ef68d7b3860859c765864ae992999

Fixes the peek popover by removing autoamtic layout on the monaco, uses JS for the syntax highlight in peeks

view details

Orta

commit sha 8782d0dbfd72f19d46deb5123533dd7f6b623329

Bring back JS errors to the playground

view details

Adam Dierkens

commit sha 95a86d857a3f45efe6a4f82447163daa2b00f12d

Fix pkg typo in README

view details

Orta Therox

commit sha 3cb5497330e464d82574e1f527336bf22e5b3eb6

Merge pull request #756 from adierkens/patch-1 Fix pkg typo in README

view details

Andrew Medworth

commit sha 8d2b08e9c6c19dcad996ba3072d63a6abf82e0b7

Switch to typescript template in create-react-app react-scripts-ts is deprecated.

view details

Orta Therox

commit sha 92e377d1dc6b8f7bf8f072555f00856f69c8ed1d

Merge pull request #760 from amdw/v2 Switch to typescript template in create-react-app

view details

Orta Therox

commit sha 510a2d489f607f74ea9559c05870e61a39b86974

Take another shot at using Berry (#758) * Take another shot at using Berry * Add yarn metadata * Try update install state * Try dropping the build state * Temporarily disable checksum checing in yarn * Try to do the least amount of work possible for repro * Fix the build * Less files in the yarn folder * Try global cache * Fix windows builds, and use foreach in tests * Package, CI tweaks * Fix jest in packages * Get tests running on the site * Get more deps tested * Consistently use the unvalidated checksum in yarn, and revert back to full builds

view details

Orta

commit sha f2c71cd707e20b6382396b80d55f0a647f1f833d

Split shiki/twoslash renderer from gatsby plugin

view details

Orta

commit sha 5a8ae4701bbe84a153b11b34ae06f14519fe25b1

Rebase

view details

push time in 13 hours

push eventmicrosoft/TypeScript-Website

Adam Dierkens

commit sha 95a86d857a3f45efe6a4f82447163daa2b00f12d

Fix pkg typo in README

view details

Orta Therox

commit sha 3cb5497330e464d82574e1f527336bf22e5b3eb6

Merge pull request #756 from adierkens/patch-1 Fix pkg typo in README

view details

Andrew Medworth

commit sha 8d2b08e9c6c19dcad996ba3072d63a6abf82e0b7

Switch to typescript template in create-react-app react-scripts-ts is deprecated.

view details

Orta Therox

commit sha 92e377d1dc6b8f7bf8f072555f00856f69c8ed1d

Merge pull request #760 from amdw/v2 Switch to typescript template in create-react-app

view details

Orta Therox

commit sha 510a2d489f607f74ea9559c05870e61a39b86974

Take another shot at using Berry (#758) * Take another shot at using Berry * Add yarn metadata * Try update install state * Try dropping the build state * Temporarily disable checksum checing in yarn * Try to do the least amount of work possible for repro * Fix the build * Less files in the yarn folder * Try global cache * Fix windows builds, and use foreach in tests * Package, CI tweaks * Fix jest in packages * Get tests running on the site * Get more deps tested * Consistently use the unvalidated checksum in yarn, and revert back to full builds

view details

Orta Therox

commit sha 68b8c3181a65596ef9d3e936b2802c2516029f09

Merge branch 'v2' into create-fs-2

view details

push time in 15 hours

PR opened microsoft/TypeScript-Website

Removes key-based react issues on handbook pages, and makes code smaller on the new site

Just wanted to make sure the yarn 2 stuff was working out fine with some light debugging

+10 -10

0 comment

3 changed files

pr created time in 15 hours

create barnchmicrosoft/TypeScript-Website

branch : remove_react_errs

created branch time in 15 hours

push eventmicrosoft/TypeScript-Website

Orta Therox

commit sha 510a2d489f607f74ea9559c05870e61a39b86974

Take another shot at using Berry (#758) * Take another shot at using Berry * Add yarn metadata * Try update install state * Try dropping the build state * Temporarily disable checksum checing in yarn * Try to do the least amount of work possible for repro * Fix the build * Less files in the yarn folder * Try global cache * Fix windows builds, and use foreach in tests * Package, CI tweaks * Fix jest in packages * Get tests running on the site * Get more deps tested * Consistently use the unvalidated checksum in yarn, and revert back to full builds

view details

push time in 16 hours

PR merged microsoft/TypeScript-Website

Take another shot at using Berry

Replaces #451 - This time it leaves node_modules around, and at least seems to build and run locally.

+28017 -19935

2 comments

22 changed files

orta

pr closed time in 16 hours

pull request commentmicrosoft/TypeScript-Website

Take another shot at using Berry

Alright, let's do it

orta

comment created time in 16 hours

pull request commentmicrosoft/TypeScript

Add extensions to `bin` scripts.

This makes sense, we should probably close this.

sosoba

comment created time in 19 hours

pull request commenttsconfig/bases

Start of a recommended base

Managed to get this into a design review (we only do one a week, but given everyone is remote they're really filled, so might be switching to two a week) - general gist for this is that we think --init is basically the recommendation and any improvements I want there should happen there.

What that means for this PR is tjat I'm going to replace this with a @tsconfig/init which will always be permanently up to date (by extracting it from typescript in a nightly job and seeing if it's changed )

Then people know there is only 1 recommended by TS tsconfig. This probably means dropping some of the existing flags which I think are recommended.

I also wonder if something like tsconfig/node12 should be extending from @tsconfig/init and might need to build that infra too.

orta

comment created time in 19 hours

pull request commentmicrosoft/TypeScript

Make the falsy part of any/unknown any/unknown

@typescript-bot pack this

andrewbranch

comment created time in 20 hours

MemberEvent

issue openedmicrosoft/TypeScript-Website

Idea: Add some notes about trademark usage on branding page

Improvement Idea:

Notes from talking with TS marketing

created time in a day

issue commentmicrosoft/TypeScript-Website

Docs: /v2/tsconfig/ 404 not found

Ah, looks like I hadn't pushed the commit which fixes those links, that should come around with the next deploy.

stringparts

comment created time in a day

push eventmicrosoft/TypeScript-Handbook

Orta

commit sha 3453c3ff6d2f5346139be15574a0679cefab4b6e

Use staging urls

view details

Orta

commit sha 61141d3b038a5342a25f82ff46cdd1ad5dfaac04

Merge branch 'master' of https://github.com/microsoft/TypeScript-Handbook

view details

push time in a day

push eventmicrosoft/TypeScript

谭九鼎

commit sha 87a74aa9ce7af130ed858aafe7bd15dfabcd57af

CI: Use checkout@v2 (#38822)

view details

push time in a day

PR merged microsoft/TypeScript

CI: Use checkout@v2

@weswigham Hi. Would you like to review this? Or it's OK to just close because it's not important.

+2 -2

1 comment

1 changed file

imba-tjd

pr closed time in a day

pull request commentmicrosoft/TypeScript

CI: Use checkout@v2

Yeah, this should be fine - we don't look into the git history on CI etc (or it would fail)

imba-tjd

comment created time in a day

push eventmicrosoft/TypeScript-Website

Orta

commit sha f48f89e03e351c89c8322ced3d005aa9f06780cc

Consistently use the unvalidated checksum in yarn, and revert back to full builds

view details

push time in a day

issue closedmicrosoft/TypeScript-Website

v2 Playground: No type errors in JS mode

Even simple example doesn't report errors even if checkJS option appears to be checked in Config dropdown.

/**
 * @param {number} a
 */
function demo(a) {
    return '' + a;
}

demo(true); // no error

Is it expected behavior? I haven't found direct mention that type checking is expected not to work, however no examples where if should show errors.

UPD. v3 has all errors in Errors tab, but no inline which is #201. Can it be a same root cause here?

closed time in a day

IllusionMH

issue closedmicrosoft/TypeScript-Website

Errors are not appearing in JS mode anymore

I added it with https://github.com/microsoft/monaco-typescript/pull/40

Is it possible that this got undone somehow since then?

closed time in a day

orta

push eventmicrosoft/TypeScript-Website

Orta

commit sha 044e8d5119326f8df464221a67a8a7d930e7d47c

Get more deps tested

view details

push time in a day

push eventmicrosoft/TypeScript-Website

Orta

commit sha 94f68258c3ec02d43ca61ab109241a754a8aba65

Get tests running on the site

view details

push time in a day

push eventmicrosoft/TypeScript-Website

Orta

commit sha 08c66c3dee6c83470549174bb03e10e906099d7c

Fix jest in packages

view details

push time in a day

created tagdanger/danger

tagv8.0.3

🚫 Stop saying "you forgot to …" in code review (in Ruby)

created time in a day

push eventdanger/danger

Orta

commit sha db9b9ba2e1c69d70e141c3cada822d0050e81ea1

vbump

view details

push time in a day

push eventmicrosoft/TypeScript-Website

Orta

commit sha 161890852a3f62c3c18c85c18e6105f1e8c9b856

Package, CI tweaks

view details

push time in a day

push eventmicrosoft/TypeScript-Website

Orta

commit sha 99ef450b87cef8cf80859c2555496e66d1f600a5

Try global cache

view details

Orta

commit sha 1a5a5369c572971eba01f6d5ab57890ca4f0ddd9

Fix windows builds, and use foreach in tests

view details

push time in a day

pull request commentmicrosoft/TypeScript-Website

Switch to typescript template in create-react-app

Cool, yeah 👍

amdw

comment created time in a day

PR merged microsoft/TypeScript-Website

Switch to typescript template in create-react-app

react-scripts-ts is deprecated.

+2 -2

1 comment

1 changed file

amdw

pr closed time in a day

push eventmicrosoft/TypeScript-Website

Andrew Medworth

commit sha 8d2b08e9c6c19dcad996ba3072d63a6abf82e0b7

Switch to typescript template in create-react-app react-scripts-ts is deprecated.

view details

Orta Therox

commit sha 92e377d1dc6b8f7bf8f072555f00856f69c8ed1d

Merge pull request #760 from amdw/v2 Switch to typescript template in create-react-app

view details

push time in a day

push eventmicrosoft/TypeScript-Website

Orta

commit sha 3fc8f253a87aa4d229c5dff1c8ae7058ff44de3b

Less files in the yarn folder

view details

push time in a day

push eventmicrosoft/TypeScript-Website

Orta

commit sha f8d1c85d98f0d266e4211d8c32ea373721002db2

Fix the build

view details

push time in a day

push eventmicrosoft/TypeScript-Website

Orta

commit sha da327515f10e8d04630da43862075bd7902f7acc

Try to do the least amount of work possible for repro

view details

push time in 2 days

push eventDefinitelyTyped/dt-mergebot

Eli Barzilay

commit sha e50890e051cd69b7390c11c8e45b25e35cd40d8b

Rename `lastCommitDate` -> `lastPushDate` ... as implicitly suggested in #126 by @weswigham, to avoid future confusions.

view details

Orta Therox

commit sha 9c16ea70ed2d09c9b58cc6f0cbc4e100d8d55218

Merge pull request #133 from elibarzilay/wip Rename `lastCommitDate` -> `lastPushDate`

view details

push time in 2 days

PR merged DefinitelyTyped/dt-mergebot

Rename `lastCommitDate` -> `lastPushDate`

... as implicitly suggested in #126 by @weswigham, to avoid future confusions.

+41 -42

0 comment

35 changed files

elibarzilay

pr closed time in 2 days

pull request commentdanger/danger-js

Update Bamboo CI source for compatibility with 7.0 version

Cool yeah - this seems fine, a search on google for the string literally only returns results from inside this repo. Perhaps it came from an older injected variables feature I can't find much info for

I'll give Tim some time to reply, but otherwise I think this is OK to not class as a major breaking

nataliSM

comment created time in 2 days

push eventdanger/danger

Philip Nguyen

commit sha 4891db0314918bc03fe125081722fce20c7608fc

Support for github RequestSource in GitlabCI It is common for code repos to be hosted on Github while using Gitlab only as a CI/CD service. Info on using Gitlab only as CI/CD service for external repos: https://docs.gitlab.com/ee/ci/ci_cd_for_external_repos/ Current limitations: Unfortunately, Gitlab currently does not expose the external repo's url, so we have to set it in an ENV var as DANGER_PROJECT_REPO_URL.

view details

Philip Nguyen

commit sha aaf6f15fe9f9a2d459b8b4d1f6668735776131ea

Move existing specs to gitlab hosted context The previous specs assumes all the PRs (or merge requests) are made on a Gitlab hosted code repository. We move those specs to its own context.

view details

Philip Nguyen

commit sha 803c24cd532d8208fdf56ad971caed3e9aec61e9

Add context for when PR made from Github repo The following tests are for methods that will have an alternate value if the code repo is hosted on Github.

view details

Philip Nguyen

commit sha 52567392bb942e047d0e618d3aa6efac4041fc3b

Is this still needed? GitlabCI with a Github hosted repository will actually have its git remote origin point to gitlab.com and not to github.com. The reason is that GitlabCI maintains a mirror of the Github Repo and that the git remote in the CI points to the mirror rather than to the actual git repository on Github. I'm not sure if I see a need for maintain this #validates_as_ci? for RequestSources...

view details

Philip Nguyen

commit sha 5b082d73f9fd47908816a02eccaa542702fc2bee

Update changelog w/ Gitlab external CI/CD

view details

Philip Q Nguyen

commit sha a16b2098614b0481120d954aef6f5c504e04ff14

Apply suggestions from code review Brand typo Co-authored-by: Yogi <me@yogi.codes>

view details

Orta Therox

commit sha 8067dd57967b29387729f2cfda776db8e46f8412

Merge pull request #1238 from philipqnguyen/gitlab-ci-external-repo GitLab CI external repo

view details

push time in 2 days

PR merged danger/danger

GitLab CI external repo

Resolves #1044

It is common for code repos to be hosted on Github while using Gitlab only as a CI/CD service.

Info on using Gitlab only as CI/CD service for external repos: https://docs.gitlab.com/ee/ci/ci_cd_for_external_repos/

Current limitations:

  • Unfortunately, Gitlab currently does not expose the external repo's url, so users will have to manually set the repo's URL as an ENV var DANGER_PROJECT_REPO_URL (for ex., DANGER_PROJECT_REPO_URL=https://github.com/procore/blueprinter).
  • Additionally, RequestSources::Github#validates_as_ci? is tricky now because the git remote -v returns origin as gitlab.com rather than github.com. The reasoning is that even though the actual repo is on Github.com, GitlabCI maintains a mirror on Gitlab.com and the CI checkout the code from the Gitlab.com mirror.
+138 -68

6 comments

5 changed files

philipqnguyen

pr closed time in 2 days

issue closeddanger/danger

Github + Gitlab CI, get_repo_source is getting gitlab (it's a mirror), but the code is on github

Report

What did you do?

I want to run my tests on Gitlab CI through the Gitlab project mirror, I set the DANGER_GITHUB_API_TOKEN on Gitlab CI config. It executes the CI on Gitlab but fails asking for a DANGER_GITLAB_API_TOKEN

What did you expect to happen?

I expected to not ask for a GITLAB token, since I don't want to open the PR/MR on Gitlab, but on Github.

What happened instead?

$ bundle install
Fetching gem metadata from https://rubygems.org/.............
Resolving dependencies...
Fetching public_suffix 3.0.3
Installing public_suffix 3.0.3
Fetching addressable 2.5.2
Installing addressable 2.5.2
Using bundler 1.16.1
Fetching claide 1.0.2
Installing claide 1.0.2
Fetching colored2 3.1.2
Installing colored2 3.1.2
Fetching cork 0.3.0
Installing cork 0.3.0
Fetching nap 1.1.0
Installing nap 1.1.0
Fetching open4 1.3.4
Installing open4 1.3.4
Fetching claide-plugins 0.9.2
Installing claide-plugins 0.9.2
Fetching multipart-post 2.0.0
Installing multipart-post 2.0.0
Fetching faraday 0.15.4
Installing faraday 0.15.4
Fetching faraday-http-cache 1.3.1
Installing faraday-http-cache 1.3.1
Fetching git 1.5.0
Installing git 1.5.0
Fetching kramdown 1.17.0
Installing kramdown 1.17.0
Fetching no_proxy_fix 0.1.2
Installing no_proxy_fix 0.1.2
Fetching sawyer 0.8.1
Installing sawyer 0.8.1
Fetching octokit 4.13.0
Installing octokit 4.13.0
Fetching unicode-display_width 1.4.0
Installing unicode-display_width 1.4.0
Fetching terminal-table 1.8.0
Installing terminal-table 1.8.0
Fetching danger 5.8.2
Installing danger 5.8.2
Fetching danger-plugin-api 1.0.0
Installing danger-plugin-api 1.0.0
Fetching danger-pep8 0.0.5
Installing danger-pep8 0.0.5
Fetching danger-todoist 1.3.0
Installing danger-todoist 1.3.0
Bundle complete! 3 Gemfile dependencies, 23 gems now installed.
Bundled gems are installed into `/usr/local/bundle`
$ bundle exec danger
bundler: failed to load command: danger (/usr/local/bundle/bin/danger)
RuntimeError: No API token given, please provide one using `DANGER_GITLAB_API_TOKEN`
  /usr/local/bundle/gems/danger-5.8.2/lib/danger/request_sources/gitlab.rb:31:in `client'
  /usr/local/bundle/gems/danger-5.8.2/lib/danger/ci_source/gitlab_ci.rb:40:in `determine_merge_request_id'
  /usr/local/bundle/gems/danger-5.8.2/lib/danger/ci_source/gitlab_ci.rb:31:in `validates_as_pr?'
  /usr/local/bundle/gems/danger-5.8.2/lib/danger/danger_core/environment_manager.rb:15:in `pr?'
  /usr/local/bundle/gems/danger-5.8.2/lib/danger/danger_core/executor.rb:62:in `validate_pr!'
  /usr/local/bundle/gems/danger-5.8.2/lib/danger/danger_core/executor.rb:46:in `validate!'
  /usr/local/bundle/gems/danger-5.8.2/lib/danger/danger_core/executor.rb:21:in `run'
  /usr/local/bundle/gems/danger-5.8.2/lib/danger/commands/runner.rb:70:in `run'
  /usr/local/bundle/gems/claide-1.0.2/lib/claide/command.rb:334:in `run'
  /usr/local/bundle/gems/danger-5.8.2/bin/danger:5:in `<top (required)>'
  /usr/local/bundle/bin/danger:29:in `load'
  /usr/local/bundle/bin/danger:29:in `<top (required)>'
ERROR: Job failed: exit code 1

Your Environment

  • Which CI are you running on?

Gitlab CI.

  • Are you running the latest version of Danger?

Yes.

  • What is your Dangerfile?

Not relevant.

If I had a way of forcing using Github as the source of the project, the problem would go away, but it detects a gitlab uri because on gitlab you can set this mirror kind of project, any suggestions?

Thank you and kudos for the project!

closed time in 2 days

javaguirre

pull request commentdanger/danger

GitLab CI external repo

Nah, not need to lock. I don't want to be accidentally missing something in the future by locking the version. I'm OK with CI being red until it's figured out, there's enough greens to validate that you didn't break something.

philipqnguyen

comment created time in 2 days

issue commentangular/angular-cli

Use TSConfig bases in npm to reduce the number of TSConfigs in a project

Totally reasonable to me 👍

orta

comment created time in 2 days

issue openedmicrosoft/TypeScript-Website

Module: Twoslash - create a reference doc, and link it at the top of the module

Improvement Idea:

Take the docs from the workbench, move them into an md file also.

Why:

You'd look for a reference either in the README on npm, or in the GH repo, neither of which have a good overview as it's kidan focused on API consumers.

created time in 2 days

push eventmicrosoft/TypeScript-Twoslash-Repro-Action

Orta Therox

commit sha f697a2d248abed14b6c0b4968efde9e62a4f0363

Update user-facing.md

view details

push time in 2 days

issue closedmicrosoft/TypeScript

Incorrect type when using nullish coalescing operator in *.js files

<!-- 🚨 STOP 🚨 𝗦𝗧𝗢𝗣 🚨 𝑺𝑻𝑶𝑷 🚨

Half of all issues filed here are duplicates, answered in the FAQ, or not appropriate for the bug tracker. Even if you think you've found a bug, please read the FAQ first, especially the Common "Bugs" That Aren't Bugs section!

Please help us by doing the following steps before logging an issue:

  • Search: https://github.com/Microsoft/TypeScript/search?type=Issues
  • Read the FAQ: https://github.com/Microsoft/TypeScript/wiki/FAQ

Please fill in the entire template below. -->

<!-- Please try to reproduce the issue with the latest published version. It may have already been fixed. For npm: typescript@next This is also the 'Nightly' version in the playground: http://www.typescriptlang.org/play/?ts=Nightly --> TypeScript Version: 3.8.3

<!-- Search terms you tried before logging this (so others can find this issue more easily) --> Search Terms: nullish coalescing in js files

Code

image

Expected behavior: same behavior for .*ts and *.js files

Actual behavior: incorrect type in *.js files

closed time in 2 days

ikabirov

issue commentmicrosoft/TypeScript

Incorrect type when using nullish coalescing operator in *.js files

Started looking into this, then realized it had been fixed in master: https://github.com/microsoft/TypeScript-Twoslash-Repro-Action/issues/8 🎉

ikabirov

comment created time in 2 days

pull request commentdanger/danger-js

Update Bamboo CI source for compatibility with 7.0 version

Any chance you can make it support both, then we don't have to make a breaking change (as I assume anyone can still be using the older versions)?

nataliSM

comment created time in 2 days

pull request commentdanger/danger

GitLab CI external repo

If you rebase I'll merge 👍

philipqnguyen

comment created time in 2 days

Pull request review commentdanger/danger

GitLab CI external repo

 def get_pr_from_branch(repo_name, branch_name, owner)         end       end +      def validates_as_ci?+        true+      end

I think this is probably reasonable

philipqnguyen

comment created time in 2 days

push eventdanger/danger

Philip Nguyen

commit sha cdaf7aaa5a7ac6ceaa2625738d7f50dcb36b2ad0

Remove GitlabCI#project_url This is not being used anymore ever since this PR was merged: https://github.com/danger/danger/pull/1157

view details

Orta Therox

commit sha b5275118f8dde52c6974f372d838c56f7e1c4270

Merge pull request #1237 from philipqnguyen/rm-gitlab-project-url Remove GitlabCI#project_url #trivial

view details

push time in 2 days

PR merged danger/danger

Remove GitlabCI#project_url #trivial

GitlabCI#project_url is not being used anymore ever since #1157 was merged.

+1 -17

1 comment

2 changed files

philipqnguyen

pr closed time in 2 days

pull request commentdanger/danger

Remove GitlabCI#project_url #trivial

Cool 👍

philipqnguyen

comment created time in 2 days

push eventmicrosoft/TypeScript-Website

Orta

commit sha 2ff220497569925f5cf10f911471607ab4694c5f

Temporarily disable checksum checing in yarn

view details

push time in 2 days

push eventmicrosoft/TypeScript-Website

Orta

commit sha 3a1ed40f30ee3070e07d0d582068084f83d4854b

Try dropping the build state

view details

push time in 2 days

push eventmicrosoft/TypeScript-Website

Orta

commit sha fc39969ee82e54db9cbf9f1b4edb4c5130af6ee4

Try update install state

view details

push time in 2 days

create barnchorta/orta

branch : master

created branch time in 2 days

created repositoryorta/orta

Profile bio

created time in 2 days

push eventmicrosoft/TypeScript-Website

Orta

commit sha a90c2a766fe34bd68221e6d9bd122b4a56efbc6a

Add yarn metadata

view details

push time in 2 days

PR opened microsoft/TypeScript-Website

Take another shot at using Berry

Replaces #451 - This time it leaves node_modules around, and at least seems to build and run locally.

+26397 -19923

0 comment

9 changed files

pr created time in 2 days

create barnchmicrosoft/TypeScript-Website

branch : yarn-v2-2

created branch time in 2 days

Pull request review commentmicrosoft/TypeScript-Website

Adds unknown as a basic type

 enum Color { } let colorName: string = Color[2]; -console.log(colorName); // Displays 'Green' as its value is 2 above+// Displays 'Green'+console.log(colorName); ``` -# Any+# Unknown  We may need to describe the type of variables that we do not know when we are writing an application.-These values may come from dynamic content, e.g. from the user or a 3rd party library.-In these cases, we want to opt-out of type checking and let the values pass through compile-time checks.-To do so, we label these with the `any` type:+These values may come from dynamic content &ndash; e.g. from the user &ndash; or we may want to intentionally accept all values in our API.+In these cases, we want to provide a type that tells the compiler and future readers that this variable could be anything, so we give it the `unknown` type.  ```ts twoslash-let notSure: any = 4;+let notSure: unknown = 4; notSure = "maybe a string instead";-notSure = false; // okay, definitely a boolean++// OK, definitely a boolean+notSure = false; ``` -The `any` type is a powerful way to work with existing JavaScript, allowing you to gradually opt-in and opt-out of type checking during compilation.-You might expect `Object` to play a similar role, as it does in other languages.-However, variables of type `Object` only allow you to assign any value to them. You can't call arbitrary methods on them, even ones that actually exist:+If you have a variable with an unknown type, you can narrow it to something more specific by doing `typeof` checks, comparison checks, or more advanced type guards that will be discussed in a later chapter:  ```ts twoslash-// @errors: 2339-let notSure: any = 4;-notSure.ifItExists(); // okay, ifItExists might exist at runtime-notSure.toFixed(); // okay, toFixed exists (but the compiler doesn't check)+// @errors: 2322 2322 2322+declare const maybe: unknown;+// 'maybe' could be a string, object, boolean, undefined, or an array+const aNumber: number = maybe;++if (maybe === true) {+  // TypeScript knows that maybe is a boolean now+  const aBoolean: boolean = maybe;+  // So, it cannot be a string+  const aString: string = maybe;

It does, that's why I removed them from the comments: https://www.staging-typescript.org/docs/handbook/basic-types.html#tuple

JojOatXGME

comment created time in 2 days

PR closed microsoft/TypeScript-Website

Adds unknown as a basic type in place of any and cautions against using any.

any should really only be used as a last resort or when porting JS code. The docs prior to this PR held any in a pretty positive light and suggested some uses for it that really weren't appropriate (unknown would have been better). This PR swaps in unknown in the spot any previously held in the basic types section, moves any to the bottom of the list, and includes language that discourages the usage of any in favor of other options like unknown, Mapped Types, and Index Types. Fixed up some references to any as well, redirecting them to unknown.

Also adjusted the wording on one of the never comments while I was in here.

+38 -27

5 comments

1 changed file

MicahZoltu

pr closed time in 2 days

pull request commentmicrosoft/TypeScript-Website

Adds unknown as a basic type in place of any and cautions against using any.

Let's call this one deprecated by https://github.com/microsoft/TypeScript-Website/pull/755

MicahZoltu

comment created time in 2 days

Pull request review commentmicrosoft/TypeScript-Website

Adds unknown as a basic type

 let colorName: string = Color[2]; console.log(colorName); // Displays 'Green' as its value is 2 above ``` -# Any+# Unknown  We may need to describe the type of variables that we do not know when we are writing an application.-These values may come from dynamic content, e.g. from the user or a 3rd party library.-In these cases, we want to opt-out of type checking and let the values pass through compile-time checks.-To do so, we label these with the `any` type:+These values may come from dynamic content &ndash; e.g. from the user &ndash; or we may want to intentionally accept all value in our API.+In these cases, we want to provide a type that tells the compiler and future readers that this variable could be anything, so we give it the `unknown` type.  ```ts twoslash-let notSure: any = 4;+let notSure: unknown = 4; notSure = "maybe a string instead"; notSure = false; // okay, definitely a boolean ``` -The `any` type is a powerful way to work with existing JavaScript, allowing you to gradually opt-in and opt-out of type checking during compilation. You might expect `Object` to play a similar role, as it does in other languages.-However, variables of type `Object` only allow you to assign any value to them. You can't call arbitrary methods on them, even ones that actually exist:+However, variables of type `Object` do not allow you to assign `null` or `undefined` when `--strictNullChecks` is specified.  ```ts twoslash-// @errors: 2339-let notSure: any = 4;-notSure.ifItExists(); // okay, ifItExists might exist at runtime-notSure.toFixed(); // okay, toFixed exists (but the compiler doesn't check)+// @errors: 2322+const notSure: Object = null; // error, type 'null' is not assignable to type 'Object'+```++If you have a variable with an unknown type, you can narrow it to something more specific by doing `typeof` checks, comparison checks, or more advanced type guards that will be discussed in a later chapter: -let prettySure: Object = 4;-prettySure.toFixed(); // Error: Property 'toFixed' doesn't exist on type 'Object'.+```ts twoslash+// @errors: 2322 2322 2322+declare const maybe: unknown;+const aNumber: number = maybe; // error, 'maybe' could be a string, object, boolean, undefined, or an array+if (maybe === true) {+  const aBoolean: boolean = maybe; // ok+  const aString: string = maybe; // error, 'maybe' is definitely a boolean, so definitely NOT a string+}+if (typeof maybe === "string") {+  const aString: string = maybe; // ok+  const aBoolean: boolean = maybe; // error, 'maybe' is definitely a string, so definitely NOT a boolean+}+```++# Any++In some situations, not all type information is available or it's declaration would take an inappropriate amount of effort.+These may occur for values from code that has been written without TypeScript or a 3rd party library.+In these cases, we might want to opt-out of type checking.+To do so, we label these values with the `any` type:++```ts twoslash+declare function getValue(key: string): any;+const str: string = getValue("myString"); // ok, return value of 'getValue' is not checked+```++The `any` type is a powerful way to work with existing JavaScript, allowing you to gradually opt-in and opt-out of type checking during compilation.+Just like `unknown`, variables of type `any` allow you to assign any value to them.+Unlike `unknown`, TypeScript let you can call arbitrary methods on them, even ones that don't exist:

Agree, I expanded this a bit in a different direction in a paragraph after after

JojOatXGME

comment created time in 2 days

Pull request review commentmicrosoft/TypeScript-Website

Adds unknown as a basic type

 let colorName: string = Color[2]; console.log(colorName); // Displays 'Green' as its value is 2 above ``` -# Any+# Unknown  We may need to describe the type of variables that we do not know when we are writing an application.-These values may come from dynamic content, e.g. from the user or a 3rd party library.-In these cases, we want to opt-out of type checking and let the values pass through compile-time checks.-To do so, we label these with the `any` type:+These values may come from dynamic content &ndash; e.g. from the user &ndash; or we may want to intentionally accept all value in our API.+In these cases, we want to provide a type that tells the compiler and future readers that this variable could be anything, so we give it the `unknown` type.  ```ts twoslash-let notSure: any = 4;+let notSure: unknown = 4; notSure = "maybe a string instead"; notSure = false; // okay, definitely a boolean ``` -The `any` type is a powerful way to work with existing JavaScript, allowing you to gradually opt-in and opt-out of type checking during compilation. You might expect `Object` to play a similar role, as it does in other languages.-However, variables of type `Object` only allow you to assign any value to them. You can't call arbitrary methods on them, even ones that actually exist:+However, variables of type `Object` do not allow you to assign `null` or `undefined` when `--strictNullChecks` is specified.  ```ts twoslash-// @errors: 2339-let notSure: any = 4;-notSure.ifItExists(); // okay, ifItExists might exist at runtime-notSure.toFixed(); // okay, toFixed exists (but the compiler doesn't check)+// @errors: 2322+const notSure: Object = null; // error, type 'null' is not assignable to type 'Object'+```

Agree

JojOatXGME

comment created time in 2 days

Pull request review commentmicrosoft/TypeScript-Website

Adds unknown as a basic type

 let colorName: string = Color[2]; console.log(colorName); // Displays 'Green' as its value is 2 above ``` -# Any+# Unknown  We may need to describe the type of variables that we do not know when we are writing an application.-These values may come from dynamic content, e.g. from the user or a 3rd party library.-In these cases, we want to opt-out of type checking and let the values pass through compile-time checks.-To do so, we label these with the `any` type:+These values may come from dynamic content &ndash; e.g. from the user &ndash; or we may want to intentionally accept all value in our API.+In these cases, we want to provide a type that tells the compiler and future readers that this variable could be anything, so we give it the `unknown` type.  ```ts twoslash-let notSure: any = 4;+let notSure: unknown = 4; notSure = "maybe a string instead"; notSure = false; // okay, definitely a boolean ``` -The `any` type is a powerful way to work with existing JavaScript, allowing you to gradually opt-in and opt-out of type checking during compilation. You might expect `Object` to play a similar role, as it does in other languages.-However, variables of type `Object` only allow you to assign any value to them. You can't call arbitrary methods on them, even ones that actually exist:+However, variables of type `Object` do not allow you to assign `null` or `undefined` when `--strictNullChecks` is specified.  ```ts twoslash-// @errors: 2339-let notSure: any = 4;-notSure.ifItExists(); // okay, ifItExists might exist at runtime-notSure.toFixed(); // okay, toFixed exists (but the compiler doesn't check)+// @errors: 2322+const notSure: Object = null; // error, type 'null' is not assignable to type 'Object'+```++If you have a variable with an unknown type, you can narrow it to something more specific by doing `typeof` checks, comparison checks, or more advanced type guards that will be discussed in a later chapter: -let prettySure: Object = 4;-prettySure.toFixed(); // Error: Property 'toFixed' doesn't exist on type 'Object'.+```ts twoslash+// @errors: 2322 2322 2322+declare const maybe: unknown;+const aNumber: number = maybe; // error, 'maybe' could be a string, object, boolean, undefined, or an array+if (maybe === true) {+  const aBoolean: boolean = maybe; // ok+  const aString: string = maybe; // error, 'maybe' is definitely a boolean, so definitely NOT a string+}+if (typeof maybe === "string") {+  const aString: string = maybe; // ok+  const aBoolean: boolean = maybe; // error, 'maybe' is definitely a string, so definitely NOT a boolean+}+```++# Any++In some situations, not all type information is available or it's declaration would take an inappropriate amount of effort.+These may occur for values from code that has been written without TypeScript or a 3rd party library.+In these cases, we might want to opt-out of type checking.+To do so, we label these values with the `any` type:++```ts twoslash+declare function getValue(key: string): any;+const str: string = getValue("myString"); // ok, return value of 'getValue' is not checked+```++The `any` type is a powerful way to work with existing JavaScript, allowing you to gradually opt-in and opt-out of type checking during compilation.+Just like `unknown`, variables of type `any` allow you to assign any value to them.+Unlike `unknown`, TypeScript let you can call arbitrary methods on them, even ones that don't exist:++```ts twoslash+// @errors: 2571+let looselyTyped: any = 4;+looselyTyped.ifItExists(); // okay, ifItExists might exist at runtime+looselyTyped.toFixed(); // okay, toFixed exists (but the compiler doesn't check)++let strictlyTyped: unknown = 4;+strictlyTyped.toFixed(); // Error: Property 'toFixed' doesn't exist on type 'unknown'. ```  The `any` type is also handy if you know some part of the type, but perhaps not all of it. For example, you may have an array but the array has a mix of different types:  ```ts twoslash let list: any[] = [1, true, "free"];- list[1] = 100; ```

Yeah, I couldn't think of a good example like this which doesn't rely on using an interface/type, so I dropped it

JojOatXGME

comment created time in 2 days

pull request commentmicrosoft/TypeScript-Website

Adds unknown as a basic type

I've addressed @MicahZoltu's feedback and applied my own feedback to this, it feels pretty good to me now 👍

JojOatXGME

comment created time in 2 days

push eventJojOatXGME/TypeScript-Website

Orta

commit sha 3b005e9d73d78b5d37c816d2f2a17ccf005d1cc6

Handles feedback

view details

push time in 2 days

push eventmicrosoft/TypeScript-Website

Orta Therox

commit sha 66cd807565476bcf1cfc7a6c079eb3cbd19f87f1

Update packages/typescript-vfs/test/index.test.ts

view details

push time in 2 days

Pull request review commentmicrosoft/TypeScript-Website

Simplify the FS backed PR

 it("runs a virtual environment and gets the right results from the LSP", () => {   `) }) +it.only("can use a FS backed system", () => {
it("can use a FS backed system", () => {
orta

comment created time in 2 days

push eventmicrosoft/TypeScript-Website

Orta

commit sha 080425839cec822de599eb24dcf99d671b541332

Fix versions

view details

push time in 2 days

issue commentdanger/danger

Reconsider Markdown Tables

Perhaps if someone can cleanly add a templating system, but otherwise, no

Ram-Z

comment created time in 2 days

push eventmicrosoft/TypeScript-Website

Orta

commit sha 556874202749fabff5253371703efa9d745fb105

Fix broken tests

view details

push time in 2 days

CommitCommentEvent

push eventmicrosoft/TypeScript-Website

Orta

commit sha fbc72e7a6319eafd096a6e99eaa585dbdd375aee

Ensure the duped file is accurate

view details

push time in 2 days

PR opened microsoft/TypeScript-Website

Simplify the FS backed PR

Embeds: https://github.com/microsoft/TypeScript-Website/pull/754

+196 -51

0 comment

6 changed files

pr created time in 2 days

push eventmicrosoft/TypeScript-Website

Orta

commit sha 5c4e56abbb52bfc97dcb99c8436d330d441d70cc

Vbump

view details

push time in 2 days

create barnchmicrosoft/TypeScript-Website

branch : create-fs-2

created branch time in 2 days

Pull request review commentmicrosoft/TypeScript-Website

add "createFSBackedSystem"

 export function createSystem(files: Map<string, string>): System {     write: () => notImplemented("write"),     writeFile: (fileName, contents) => {       files.set(fileName, contents)-    }+    },+  }+}++/**+ * Creates a file-system backed System object which can be used in a TypeScript program, this+ * is what provides read/write aspects of the virtual fs+ */+export function createFSBackedSystem(files: Map<string, string>): System {+  const fs = require("fs")++  return {+    args: [],+    createDirectory: () => notImplemented("createDirectory"),+    // TODO: could make a real file tree+    directoryExists: audit("directoryExists", directory => {+      return Array.from(files.keys()).some(path => path.startsWith(directory)) || fs.existsSync(directory)+    }),+    exit: () => notImplemented("exit"),+    fileExists: audit(+      "fileExists",+      fileName => files.has(fileName) || files.has(libize(fileName)) || fs.existsSync(fileName)+    ),+    getCurrentDirectory: () => "/",+    getDirectories: () => [],+    getExecutingFilePath: () => notImplemented("getExecutingFilePath"),+    readDirectory: audit("readDirectory", directory => (directory === "/" ? Array.from(files.keys()) : [])),+    readFile: audit(+      "readFile",+      fileName => files.get(fileName) || files.get(libize(fileName) || fs.readFileSync(fileName, { encoding: "utf-8" }))+    ),

Perhaps the answer is to provide a FS root to work from

hipstersmoothie

comment created time in 2 days

Pull request review commentmicrosoft/TypeScript-Website

add "createFSBackedSystem"

 export function createSystem(files: Map<string, string>): System {     write: () => notImplemented("write"),     writeFile: (fileName, contents) => {       files.set(fileName, contents)-    }+    },+  }+}++/**+ * Creates a file-system backed System object which can be used in a TypeScript program, this+ * is what provides read/write aspects of the virtual fs+ */+export function createFSBackedSystem(files: Map<string, string>): System {+  const fs = require("fs")++  return {+    args: [],+    createDirectory: () => notImplemented("createDirectory"),+    // TODO: could make a real file tree+    directoryExists: audit("directoryExists", directory => {+      return Array.from(files.keys()).some(path => path.startsWith(directory)) || fs.existsSync(directory)+    }),+    exit: () => notImplemented("exit"),+    fileExists: audit(+      "fileExists",+      fileName => files.has(fileName) || files.has(libize(fileName)) || fs.existsSync(fileName)+    ),+    getCurrentDirectory: () => "/",+    getDirectories: () => [],+    getExecutingFilePath: () => notImplemented("getExecutingFilePath"),+    readDirectory: audit("readDirectory", directory => (directory === "/" ? Array.from(files.keys()) : [])),+    readFile: audit(+      "readFile",+      fileName => files.get(fileName) || files.get(libize(fileName) || fs.readFileSync(fileName, { encoding: "utf-8" }))+    ),

I think this might be a bit too naive, as it looks like the current dir is "/" and I'm not sure it can resolve to your projects node modules, will take a look

hipstersmoothie

comment created time in 2 days

push eventmicrosoft/TypeScript-Website

Adam Dierkens

commit sha 95a86d857a3f45efe6a4f82447163daa2b00f12d

Fix pkg typo in README

view details

Orta Therox

commit sha 3cb5497330e464d82574e1f527336bf22e5b3eb6

Merge pull request #756 from adierkens/patch-1 Fix pkg typo in README

view details

push time in 2 days

PR merged microsoft/TypeScript-Website

Fix pkg typo in README

probably a missed copy/paste

+1 -1

1 comment

1 changed file

adierkens

pr closed time in 2 days

pull request commentmicrosoft/TypeScript-Website

Fix pkg typo in README

Thanks!

adierkens

comment created time in 2 days

Pull request review commentmicrosoft/TypeScript

Import the semantic highlighter from typescript-vscode-sh-plugin

+/** @internal */
+namespace ts.classifier.v2020 {
+
+    /** @internal */
+    export const enum TokenEncodingConsts {
+        typeOffset = 8,
+        modifierMask = (1 << typeOffset) - 1
+    }
+
+    /** @internal */
+    export const enum TokenType {
+        class, enum, interface, namespace, typeParameter, type, parameter, variable, enumMember, property, function, member
+    }
+
+    /** @internal */
+    export const enum TokenModifier {
+        declaration, static, async, readonly, defaultLibrary, local
+    }
+
+    /** This is mainly used internally for testing */
+    export function getSemanticClassifications(program: Program, _cancellationToken: CancellationToken, sourceFile: SourceFile, span: TextSpan): ClassifiedSpan[] {
+        const classifications = getEncodedSemanticClassifications(program, _cancellationToken, sourceFile, span);
+
+        Debug.assert(classifications.spans.length % 3 === 0);
+        const dense = classifications.spans;
+        const result: ClassifiedSpan[] = [];
+        for (let i = 0; i < dense.length; i += 3) {
+            result.push({
+                textSpan: createTextSpan(dense[i], dense[i + 1]),
+                classificationType: dense[i + 2]
+            });
+        }
+
+        return result;
+    }
+
+    export function getEncodedSemanticClassifications(program: Program, _cancellationToken: CancellationToken, sourceFile: SourceFile, span: TextSpan): Classifications {
+        return {
+            spans: getSemanticTokens(program, sourceFile, span),
+            endOfLineState: EndOfLineState.None
+        };
+    }
+
+    function getSemanticTokens(program: Program, sourceFile: SourceFile, span: TextSpan): number[] {
+        const resultTokens: number[] = [];
+
+        const collector = (node: Node, typeIdx: number, modifierSet: number) => {
+            resultTokens.push(node.getStart(sourceFile), node.getWidth(sourceFile), ((typeIdx + 1) << TokenEncodingConsts.typeOffset) + modifierSet);
+        };
+
+        if (program && sourceFile) {
+            collectTokens(program, sourceFile, span, collector);
+        }
+        return resultTokens;
+    }
+
+    function collectTokens(program: Program, sourceFile: SourceFile, span: TextSpan, collector: (node: Node, tokenType: number, tokenModifier: number) => void) {
+        const typeChecker = program.getTypeChecker();
+
+        let inJSXElement = false;
+
+        function visit(node: Node) {
+            if (!node || !textSpanIntersectsWith(span, node.pos, node.getFullWidth()) || node.getFullWidth() === 0) {
+                return;
+            }
+            const prevInJSXElement = inJSXElement;
+            if (isJsxElement(node) || isJsxSelfClosingElement(node)) {
+                inJSXElement = true;
+            }
+            if (isJsxExpression(node)) {
+                inJSXElement = false;
+            }
+
+            if (isIdentifier(node) && !inJSXElement && !inImportClause(node)) {
+                let symbol = typeChecker.getSymbolAtLocation(node);
+                if (symbol) {
+                    if (symbol.flags & SymbolFlags.Alias) {
+                        symbol = typeChecker.getAliasedSymbol(symbol);
+                    }
+                    let typeIdx = classifySymbol(symbol, getMeaningFromLocation(node));
+                    if (typeIdx !== undefined) {
+                        let modifierSet = 0;
+                        if (node.parent) {
+                            const parentIsDeclaration = (isBindingElement(node.parent) || tokenFromDeclarationMapping[node.parent.kind] === typeIdx);
+                            if (parentIsDeclaration && (<NamedDeclaration>node.parent).name === node) {
+                                modifierSet = 1 << TokenModifier.declaration;
+                            }
+                        }
+
+                        // property declaration in constructor
+                        if (typeIdx === TokenType.parameter && isRightSideOfQualifiedNameOrPropertyAccess(node)) {
+                            typeIdx = TokenType.property;
+                        }
+
+                        typeIdx = reclassifyByType(typeChecker, node, typeIdx);
+
+                        const decl = symbol.valueDeclaration;
+                        if (decl) {
+                            const modifiers = getCombinedModifierFlags(decl);
+                            const nodeFlags = getCombinedNodeFlags(decl);
+                            if (modifiers & ModifierFlags.Static) {
+                                modifierSet |= 1 << TokenModifier.static;
+                            }
+                            if (modifiers & ModifierFlags.Async) {
+                                modifierSet |= 1 << TokenModifier.async;
+                            }
+                            if (typeIdx !== TokenType.class && typeIdx !== TokenType.interface) {
+                                if ((modifiers & ModifierFlags.Readonly) || (nodeFlags & NodeFlags.Const) || (symbol.getFlags() & SymbolFlags.EnumMember)) {
+                                    modifierSet |= 1 << TokenModifier.readonly;
+                                }
+                            }
+                            if ((typeIdx === TokenType.variable || typeIdx === TokenType.function) && isLocalDeclaration(decl, sourceFile)) {
+                                modifierSet |= 1 << TokenModifier.local;
+                            }
+                            if (program.isSourceFileDefaultLibrary(decl.getSourceFile())) {
+                                modifierSet |= 1 << TokenModifier.defaultLibrary;
+                            }
+                        }
+                        else if (symbol.declarations && symbol.declarations.some(d => program.isSourceFileDefaultLibrary(d.getSourceFile()))) {
+                            modifierSet |= 1 << TokenModifier.defaultLibrary;
+                        }
+
+                        collector(node, typeIdx, modifierSet);
+
+                    }
+                }
+            }
+            forEachChild(node, visit);
+
+            inJSXElement = prevInJSXElement;
+        }
+        visit(sourceFile);
+    }
+
+    function classifySymbol(symbol: Symbol, meaning: SemanticMeaning): TokenType | undefined {
+        const flags = symbol.getFlags();
+        if (flags & SymbolFlags.Class) {

The results sent back are different, and conform to a WIP LSP spec. The current one is used by VS, so we basically need to support both. I think this test shows the differences in the results quite well:

var c = classification;
const c = classification("original");
verify.syntacticClassificationsAre(
     c.comment(firstCommentText),
     c.keyword("function"), c.identifier("myFunction"), c.punctuation("("), c.comment("/* x */"), c.parameterName("x"), c.punctuation(":"), c.keyword("any"), c.punctuation(")"), c.punctuation("{"),
     c.keyword("var"), c.identifier("y"), c.operator("="), c.identifier("x"), c.operator("?"), c.identifier("x"), c.operator("++"), c.operator(":"), c.operator("++"), c.identifier("x"), c.punctuation(";"),
     c.punctuation("}"),
     c.comment("// end of file")); 
     c.comment("// end of file"));

const c2 = classification("2020");
 verify.semanticClassificationsAre("2020",
     c2.semanticToken("function.declaration", "myFunction"), 
     c2.semanticToken("parameter.declaration", "x"), 
     c2.semanticToken("variable.declaration.local", "y"), 
     c2.semanticToken("parameter", "x"), 
     c2.semanticToken("parameter", "x"), 
     c2.semanticToken("parameter", "x"), 
 );

The first format (original) includes everything form comments to braces, the second (LSP) is quite an explicit a subset of those results

orta

comment created time in 2 days

issue commentdanger/danger

Not enough space for warning emoji on Gitlab

Try editing the HTML to see if there's a table heading size which makes it fit, and maybe we can just bump it to that if it's not a breaking change everywere

Ram-Z

comment created time in 2 days

issue commentdanger/danger-js

Bug: Markdown Message Ordering got shuffled?

You're welcome to fix it 👍

Maybe add a creation date to the Violations and then sort it at the end

fbartho

comment created time in 2 days

pull request commentmicrosoft/monaco-typescript

Use bundled ESNext

I've dropped using this in the playground in favor of #64

orta

comment created time in 2 days

pull request commentmicrosoft/monaco-typescript

Let TypeScript resolve deps in lib files + allow external tools to extend the lib support

This PR got an update: the lib d.ts files are now represented as Monaco in-memory models. This allows for features like peek to work, and for people to reliably show the files in their Monaco instances.

orta

comment created time in 2 days

push eventmicrosoft/monaco-typescript

Orta Therox

commit sha 0dbccdea3d4e1df05c98f5a02eab8ac00e7bdc83

Update src/workerManager.ts Co-authored-by: Wesley Wigham <wewigham@microsoft.com>

view details

push time in 2 days

push eventDefinitelyTyped/dt-mergebot

Eli Barzilay

commit sha 808a34b2aba517c04fcae1d94b46815079100c3f

Scrub diagnostics in markdown in json test files It repeats information in `derived.json`, just in a harder to inspect way due to long line of text. The regexp that is used is careful to delete only these things (there are more uses of `<details>` for the benchmark results and for many reviewers). Done both in the testing code and in `create-fixture.ts`. I also removed it manually from existing input files to keep things compact. (And also some more hand linting.) Closes #127.

view details

Orta Therox

commit sha 141ed28a5e77e9e486ae9416b19f4858f8330735

Merge pull request #132 from elibarzilay/wip1 Scrub diagnostics in markdown in json test files

view details

push time in 3 days

PR merged DefinitelyTyped/dt-mergebot

Scrub diagnostics in markdown in json test files

It repeats information in derived.json, just in a harder to inspect way due to long line of text. The regexp that is used is careful to delete only these things (there are more uses of <details> for the benchmark results and for many reviewers).

Done both in the testing code and in create-fixture.ts. I also removed it manually from existing input files to keep things compact.

(And also some more hand linting.)

Closes #127.

+168 -159

1 comment

101 changed files

elibarzilay

pr closed time in 3 days

issue closedDefinitelyTyped/dt-mergebot

Strip out the summary JSON in the markdown of the fixtures?

This would mean PRs have smaller diffs in general, and knowing that the JSON is in there is never actually something we're testing in reality.

closed time in 3 days

orta

pull request commentDefinitelyTyped/dt-mergebot

Scrub diagnostics in markdown in json test files

Looks good, nice one

elibarzilay

comment created time in 3 days

Pull request review commentDefinitelyTyped/dt-mergebot

Detect markdown files too

 function analyzeReviews(prInfo: PR_repository_pullRequest, isOwner: (name: strin     }); } -function getDangerLevel(categorizedFiles: readonly FileLocation[]) {+function getDangerLevel(categorizedFiles: readonly FileInfo[]) {     if (categorizedFiles.some(f => f.kind === "infrastructure")) {         return "Infrastructure";+    }+    const packagesTouched = getPackagesTouched(categorizedFiles);+    if (packagesTouched.length === 0) { // ????

If you edit the root README.md or localization PRs etc

elibarzilay

comment created time in 3 days

Pull request review commentDefinitelyTyped/dt-mergebot

Detect markdown files too

 function getLastMaintainerBlessingDate(timelineItems: PR_repository_pullRequest_     return undefined; } -type FileLocation = ({-    kind: "test",-    package: string-} | {-    kind: "definition",-    package: string-} | {-    kind: "package-meta",-    package: string-} | {-    kind: "infrastructure"-}) & { filePath: string };--function categorizeFile(filePath: string): FileLocation {-    // https://regex101.com/r/OKUe4Q/1/-    const match = /^types\/(.*?)\/.*?[^\/](?:\.(d\.ts|tsx?))?$/.exec(filePath);-    if (!match) return { filePath, kind: "infrastructure" };+type FileKind = "test" | "definition" | "markdown" | "package-meta" | "infrastructure";++type FileInfo = {+    path: string,+    kind: FileKind,+    package: string | undefined+};++function categorizeFile(path: string): FileInfo {+    // https://regex101.com/r/eFvtrz/1

Thannkkkkkssss

elibarzilay

comment created time in 3 days

Pull request review commentDefinitelyTyped/dt-mergebot

Detect markdown files too

 function getLastMaintainerBlessingDate(timelineItems: PR_repository_pullRequest_     return undefined; } -type FileLocation = ({-    kind: "test",-    package: string-} | {-    kind: "definition",-    package: string-} | {-    kind: "package-meta",-    package: string-} | {-    kind: "infrastructure"-}) & { filePath: string };--function categorizeFile(filePath: string): FileLocation {-    // https://regex101.com/r/OKUe4Q/1/-    const match = /^types\/(.*?)\/.*?[^\/](?:\.(d\.ts|tsx?))?$/.exec(filePath);-    if (!match) return { filePath, kind: "infrastructure" };+type FileKind = "test" | "definition" | "markdown" | "package-meta" | "infrastructure";++type FileInfo = {+    path: string,+    kind: FileKind,+    package: string | undefined+};++function categorizeFile(path: string): FileInfo {+    // https://regex101.com/r/eFvtrz/1+    const match = /^types\/(.*?)\/.*?[^\/](?:\.(d\.ts|tsx?|md))?$/.exec(path);+    if (!match) return { path, kind: "infrastructure", package: undefined };     const [pkg, suffix] = match.slice(1); // `suffix` can be null-    switch ((suffix || "").toLowerCase()) {-        case "d.ts": return { filePath, kind: "definition", package: pkg };-        case "ts": case "tsx": return { filePath, kind: "test", package: pkg };-        default: return { filePath, kind: "package-meta", package: pkg };+    switch ((suffix || "")) {

Did you want to lose the .toLowerCase?

elibarzilay

comment created time in 3 days

push eventDefinitelyTyped/dt-mergebot

Eli Barzilay

commit sha d9ec65c37e3092395a7780d65893e8a5e12474fe

Consider only the last review from each author The code was already ignoring stale reviews for a different `headRefOid`, but it might be that a second review approves a request without changes, so the first review for the same author should be ignored even if it's the same headref. (Note that the test case still doesn't want to merge it, because the PR also edited multiple packages.)

view details

Orta Therox

commit sha 81244689e7ed8b4a5a8c6de1f57b2cce89f30715

Merge pull request #131 from elibarzilay/wip2 Consider only the last review from each author

view details

push time in 3 days

more