profile
viewpoint
Tsotne Nazarashvili thecotne Tbilisi, Georgia

akalongman/sublimetext-codeformatter 763

Code Formatter plugin for ST2/ST3

akalongman/sublimetext-stringutilities 83

Sublime Text 2/3 plugin for string manipulations

akalongman/sublimetext-autobackups 65

Sublime Text 2/3 Auto backups plugin

Girchi/girchi-com-ui 8

Girchi.com UI

thecotne/devtime-ge 8

დეველოპერების დროა!

Girchi/girchi-com-frontend 1

[EXPERIMENTAL] girchi.com frontend implemented in React

thecotne/awesome-georgian-talks 1

This is mirror of previous awesome-georgian-talks.

thecotne/find-expired-domains 1

find expired domains

thecotne/alias-regex-webpack-plugin 0

Webpack plugin that enables overriding module import paths using a regex match and a replacement

thecotne/anchorjs 0

Add deep anchor links to your docs.

issue commentJSMonk/hegel

Cannot read property 'argumentsTypes' of undefined

you need to exclude node_modules and most of your files and try to run hegel on few files or on specific files at a time to find what is causing that error since that is not type error it's hegel crashing with that message so it does not report where in code problem is located

i have similar attempt documented here #208

manast

comment created time in 3 days

issue commentJSMonk/hegel

Hegel and JSX

@trusktr hegel is using babel parser and babel AST so babel plugins can be used as well

unrealsolver

comment created time in 3 days

issue commentJSMonk/hegel

Hegel and JSX

@ryansolid if we make plugins used by hegel configurable we can support any number of frameworks/libraries

for example with babel-plugin-jsx-dom-expressions we can support DOM Expressions like so

Screen Shot 2020-06-22 at 08 06 10

unrealsolver

comment created time in 13 days

issue commentJSMonk/hegel

Hegel and JSX

we can just add @babel/plugin-transform-react-jsx plugin and most of jsx will work without much effort

also type system will have same behaviour on jsx and React.createElement code

Screen Shot 2020-06-22 at 07 33 38

unrealsolver

comment created time in 13 days

push eventthecotne/hegel

Demetri0

commit sha aa4e1cd74439457ecb5f878cd77a700656b1bd36

annotate Array.push with $Throws<TypeError> Array.protorype.push throws TypeError in case len + argCount > 2**53 - 1 Reference: - https://tc39.es/ecma262/#sec-array.prototype.push

view details

Demetri0

commit sha 62e242ee58b27bc06dd468abf90b04672b64812d

annotate Array.push with $Throws<TypeError | RangeError> Array.prototype.push throws TypeError in case len + argCount > 2**53 - 1 and RangeError in case len + argCount > 2**32 - 1 that specified in Object Type Reference: - https://www.ecma-international.org/ecma-262/6.0/#sec-object-type - https://www.ecma-international.org/ecma-262/6.0/#sec-array.prototype.push

view details

Demetri0

commit sha 68ac1d74c4f63276f28f54e9e5e89a336cfdb86e

annotate ArrayConstructor with $Throws<TypeError | RangeError> Reference: - https://www.ecma-international.org/ecma-262/6.0/#sec-object-type

view details

Demetri0

commit sha cf446ed0ad15d9bbf0cb1d29c23240dc1c6874c6

anotate Array with $Throws References: - https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array - https://tc39.es/ecma262/#sec-array-constructor

view details

Demetri0

commit sha 7c7d7ac4fbe512a5ee345086972ff578708b252f

annotate ArrayBufferConstructor with $Throws<TypeError | RangeError>

view details

Demetri0

commit sha 839c119916c3706a7eec653dd0cda94027f0bdf0

annotate reduce & reduceRight methods of Arrays with $Thwors<TypeError>

view details

Demetri0

commit sha f3c91be48d07d14fd1f15586f0833b124e45264c

Merge branch 'master' of https://github.com/JSMonk/hegel into annotate-standard-exceptions-indexec-collections

view details

Demetri0

commit sha 30b9f29e11628af1f5d4b8c7848afce9aca360e9

Merge branch 'master' of https://github.com/JSMonk/hegel into annotate-standard-exceptions-indexec-collections

view details

Demetri0

commit sha d9af6d4996fe10b930df06c342a229fc56d224fa

Merge branch 'master' into annotate-standard-exceptions-indexec-collections

view details

Yevhen

commit sha 3433358c78220430ed8301a9d68529e43c69d60f

Merge pull request #11 from JSMonk/master Update fork

view details

Demetri0

commit sha d81a42415da0c973eef48d4e2a8ab8aabb73ddd1

annotate ReadonlyArray.concat with $Throws<TypeError | RangeError>

view details

Demetri0

commit sha 4504a2c123c74dfffce7fb3cbf18dc6cf893e426

annotate eval with $Throws

view details

Demetri0

commit sha 6c559a5387d7423da7fe04e008e05b037f6150ba

annotate Function properties with $Throws

view details

Demetri0

commit sha b1affb1a666016f88273dac058114bf448c7a497

merge with master

view details

Demetri0

commit sha b5d09be8d13ba6549eee9b2246c1f7dd13306273

remove extra comment lines

view details

Demetri0

commit sha cecdeb79c820ed8e49aec69772722a55de1df4c6

annotate Global Objects / Object with $Throws

view details

Demetri0

commit sha af6db7cb55a8c76f411d5d9d6028ff08e72894a9

annotate Number with $Throws<RangeError>

view details

Demetri0

commit sha 177076178f0d836af4ebce78370158c2af28f009

annotate Time.toISOString with $Throws<RangeError>

view details

Demetri0

commit sha e0e6c55f50f1f8b0b74f03969e948c762fc8d78d

annotate String.repeat with $Throws<RangeError>

view details

Yevhen

commit sha a93ef9b8dec3d0b393bd5d737a57e7a29b6b196c

Merge pull request #12 from JSMonk/master Update fork

view details

push time in 13 days

pull request commentJSMonk/hegel

fix @hegel/language-server

@YevhenKap resolved

thecotne

comment created time in 19 days

push eventthecotne/hegel

Artem Kobzar

commit sha ae617e8778f6ae7a6e179057e137aa3ee1df08c0

fix(Issue #230): drop rollup of object types.

view details

Artem Kobzar

commit sha 8efef9ce915d748520ce5b080581157841ee1e1f

fix(Issue #234): prevent assignment between functions variables.

view details

Artem Kobzar

commit sha 206120c12ac2b7766ee155877ddc1a9263de0460

fix(Issue #235): unwrap inner promise.

view details

Artem Kobzar

commit sha e29dd7f7d2142cac6f0de7887403b11e1299dfe5

fix(Issue #271): custom generic class creation.

view details

Artem Kobzar

commit sha d12b29bfbde34a55ac448415ae94c07f982c7407

fix(Issue #271): change strategy for empty classes.

view details

Artem Kobzar

commit sha ed8e5965b215bee3430962f07064f839bea603c5

fix(Issue #270): unpack $BottomType for $Intersection.

view details

Artem Kobzar

commit sha a6c000eaab84708ec03d72fb2fab6714b9119237

fix(Issue #269): unpack cached $BottomType.

view details

Artem Kobzar

commit sha f907b4665761970e0d50ad1f9410d21da24f4c2c

v0.0.44

view details

Artem Kobzar

commit sha 754757dc50251217211a689d5bc9b4ae73942ff2

chore: version 0.0.44.

view details

Artem Kobzar

commit sha af71de116f4a8b67eae6900546c3526b6f62a1a1

fix(Issue #274): move up Errors declarations because classes don't hoist.

view details

Artem Kobzar

commit sha eb3ee28865312a06394c7ffddb05a3d1e72ab408

v0.0.44

view details

Artem Kobzar

commit sha 28555a723bc66e7c05b7ff21d4b596b001a5d5a3

chore: add lost package.json update.

view details

Artem Kobzar

commit sha a7a667763334284e1af6b9a39611d490f7902a09

chore: version 0.0.45.

view details

Cotne Nazarashvili

commit sha f623254b41eca69647207a40ad3c4bcf6a4b8f05

fix @hegel/language-server

view details

Cotne Nazarashvili

commit sha ee0f61aaa455106e68ade5fa92e8bb9b54315718

add search.exclude in .vscode/settings.json

view details

Cotne Nazarashvili

commit sha 5d4e696ec1b47e1372b90c3098a1b31f9eb4f207

fix @hegel/typings's path in @hegel/language-server

view details

Cotne Nazarashvili

commit sha 9d693587aeb0c371376aa1beba9e555b28d7988b

rename hegel-language-server to @hegel/language-server

view details

Cotne Nazarashvili

commit sha b3db498450c07c0447ded9846f1eabebfc3127eb

use rollup to bundle @hegel/language-server

view details

Cotne Nazarashvili

commit sha 00a4d50a749bf2cd68c45a2f489d47fbafb6773e

fix .vscode/launch.json

view details

Cotne Nazarashvili

commit sha bed5e1349d88ceff0f8479c34a8512b73c320677

remove test script from @hegel/language-server

view details

push time in 19 days

issue commentJSMonk/hegel

README missing in npm tarball

@Raynos apparently i have broken your fix with this #252

i was thinking to restore your implementation but i am confused. should not readme describe package? and if so then we need seperate readme for @hegel/cli and @hegel/core

Raynos

comment created time in 24 days

issue commentJSMonk/hegel

empty array with Array constructor

array will have empty slots only if you pass single number to constructor and if number is greater than zero (if it's less then zero its a RangeError)

Screen Shot 2020-06-10 at 10 09 53

implementing this to closely match javascript semantics might be over engineering at this point but it can be done

thecotne

comment created time in 24 days

issue openedJSMonk/hegel

separate packages for language server and VS Code extension

there is two major problems with having VS Code extension + language server in same package

  1. VS Code extension will only support latest version of hegel breaking any project's workflow if they decide to not update hegel for whatever reason...
  2. it will be harder for us to get hegel supported in other Editors/IDEs

more one second reason below


LSP creates the opportunity to reduce the m-times-n complexity problem of providing a high level of support for any programming language in any editor, IDE, or client endpoint to a simpler m-plus-n problem.

For example, instead of the traditional practice of building a Python plugin for VSCode, a Python plugin for Sublime Text, a Python plugin for Vim, a Python plugin for Sourcegraph, and so on, for every language, LSP allows language communities to concentrate their efforts on a single, high performing language server that can provide code completion, hover tooltips, jump-to-definition, find-references, and more, while editor and client communities can concentrate on building a single, high performing, intuitive and idiomatic extension that can communicate with any language server to instantly provide deep language support.

Screen Shot 2020-06-08 at 17 02 35

source: https://langserver.org/#:~:text=Why%20LSP

created time in a month

issue commentrollup/plugins

[commonjs] require.resolve is rewritten

as a workaround you can replace commonjsRequire.resolve with require.resolve from output plugins

export default {
  // ...
  output: {
    // ...
    plugins: [
      replace({ 'commonjsRequire.resolve': 'require.resolve' })
    ]
  }
}
tkalliom

comment created time in a month

push eventthecotne/hegel

Cotne Nazarashvili

commit sha 507bc4f85ab1b867bc4288f72ba8059bd6858b63

update workaround for require.resolve rollup/plugins#406

view details

push time in a month

push eventthecotne/state-of-js-type-systems

Cotne Nazarashvili

commit sha cc8e29aeb80c8597bc05b577d27a84519059e93e

remove "and primitive types" from "Correctly balanced nominal and structural typing"

view details

push time in a month

push eventthecotne/state-of-js-type-systems

Cotne Nazarashvili

commit sha 4c1deb475923e5a62e8507ae04fc2adfac47415f

remove "Objects are not assignable to primitive types"

view details

push time in a month

issue commentJSMonk/hegel

Fix typings in master after adding `$Throws`.

@JSMonk can you describe what is an issue with new version of @hegel/typings maybe we can get someone to volunteer to fix this?

JSMonk

comment created time in a month

push eventthecotne/hegel

Cotne Nazarashvili

commit sha 01ed7c1ae16205e091dd60a460f6522df4f261d6

remove test script from @hegel/language-server

view details

push time in a month

startedrollup/plugins

started time in a month

startedrollup/rollup

started time in a month

pull request commentJSMonk/hegel

fix @hegel/language-server

for some reason i get this error

Screen Shot 2020-06-06 at 01 51 23

there is no index.js.git in my workspace and it only shows that error in editor when i click on that error if i just open index.js everything is ok

i am testing this on @hegel/cli

thecotne

comment created time in a month

push eventthecotne/hegel

Cotne Nazarashvili

commit sha 22a3b38974fbe0e459f243eb180255133293005b

fix .vscode/launch.json

view details

push time in a month

pull request commentJSMonk/hegel

fix @hegel/language-server

at this point i think it's in working condition and ready to be reviewed/merged...

thecotne

comment created time in a month

Pull request review commentJSMonk/hegel

fix @hegel/language-server

 {-  "name": "hegel-language-server",+  "name": "@hegel/language-server",

i have added extension.json and updated package.json as you can see there are no duplicated information in those two files so maintenance will not be a problem ...

thecotne

comment created time in a month

push eventthecotne/hegel

Cotne Nazarashvili

commit sha b0ba540c3531114c157ef4722adbfe9a57ad6817

use rollup to bundle @hegel/language-server

view details

push time in a month

issue openedJSMonk/hegel

can't construct generic class

class GenericNumber<T> {}

// Generic "constructor GenericNumber<T>" called with wrong number of arguments. Expect: 2, Actual: 1
let myGenericNumber = new GenericNumber<number>();

try

created time in a month

issue commentJSMonk/hegel

Objects to unions converter

@vasilii-kovalev i have reported Values type issue separately https://github.com/JSMonk/hegel/issues/269

vasilii-kovalev

comment created time in a month

issue openedJSMonk/hegel

custom generic with magic type

this is ok

const arr02: Array<$Values<[1, 2, 3]>> = [];

try

this is "AnalyzationError: Cannot read property 'argumentsTypes' of undefined"

type Values<T> = Array<$Values<T>>;

const arr01: Values<[1, 2, 3]> = [];

try

created time in a month

issue commentJSMonk/hegel

empty array with Array constructor

@JSMonk it should not report error as new Array and [] create exactly same value


confusion comes from me editing should work into should not work because i misread and then when i realized it vas correct in first place i have changed back to should work

thecotne

comment created time in a month

issue openedJSMonk/hegel

empty array with Array constructor

const arr01: Array<number> = []
const arr02: Array<number> = new Array// should work

try

created time in a month

issue openedJSMonk/hegel

$Immutable<T> of user defined values

class Cotne {
  name: ?string

  setName(name) {
    this.name = name
  }
}

const cotne = new Cotne

cotne.name = "not cotne"// ok
cotne.setName("not cotne")// ok

const readonly_cotne: $Immutable<Cotne> = new Cotne

readonly_cotne.name = "not cotne"// should error
readonly_cotne.setName("not cotne")// should error

const readonly_cotne2: $Immutable<{ name: string }> = { name: 'cotne' }

readonly_cotne2.name = 'dsds'// should error

try

created time in a month

issue commentJSMonk/hegel

Subtyping functions with optional arguments is unsound

@JSMonk it seems like you just make it harder to have runtime error this way but it's not actually fixed

function foo(x: ?string) {
  if (x !== undefined) {
    const val = x.toLowerCase();
  }
}

function identity<T>(a: T): T {
  return a
}

const foo_ = identity<() => undefined>(foo); // Either this
const foo__= identity<(x: number) => undefined>(foo_); //  or this shouldn't be allowed

foo__(1); // runtime error

try

vkurchatkin

comment created time in a month

pull request commentJSMonk/hegel

fix @hegel/language-server

@JSMonk i expected VS Code extension to only contain language server client and language server itself to be part of cli like it is with flow (not sure about typescript)

so language server and cli in project is same version even if you have alpha/beta release of cli or old version of cli


@JSMonk also wanted to ask are you ok with removing typescript from @hegel/language-server maybe even migrating to hegel

thecotne

comment created time in a month

Pull request review commentJSMonk/hegel

fix @hegel/language-server

 {-  "name": "hegel-language-server",+  "name": "@hegel/language-server",

i am actually still working on it

packaged version sill does not work ...

thecotne

comment created time in a month

Pull request review commentJSMonk/hegel

fix @hegel/language-server

 {-  "name": "hegel-language-server",+  "name": "@hegel/language-server",

i am not sure what fields i will take from package.json since it's private and does not need to include anything beyond dependencies, devDependencies, scripts and name (all of those are not needed in build/package.json)

thecotne

comment created time in a month

Pull request review commentJSMonk/hegel

fix @hegel/language-server

 {-  "name": "hegel-language-server",+  "name": "@hegel/language-server",

i don't have exact solution for now

but i am not planning to have duplicated info in extension.json and package.json i am thinking to have script for generating build/package.json that can take some fields from package.json and others from extension.json

for example name will be present on both of them but activationEvents, engines.vscode, publisher, displayName, contributes will be in extension.json

i think most of fields will be in extension.json and since this package is not published on npm i will make it private and remove all non essential stuff from package.json like repository, description, version that is only used when publishing to registry

thecotne

comment created time in a month

issue commentJSMonk/hegel

Unsound subclassing is allowed

@JSMonk so do you want usage based typing after all?


in flow if you specify type in any class then all other implementations are checked for compatibility

class A {
  foo(): number {
    return 1;
  }
}

class B extends A {
  foo() {
    return '';// err
  }
}

const b = new A;
const val = b.foo();

flow's approach sounds like better idea specially if there is flag in config to disallow widening type when extending class (for people coming from typescript who like to have Liskov Pattern enforced in codebase)

vkurchatkin

comment created time in a month

issue openedJSMonk/hegel

Magic Types vs Utility Types in docs

let's rename Magic Types into something that does not sound like i am doing something wrong or unsafe see Magic (programming)

for example flow uses name Utility Types that sounds descriptive and does not sound scary

and typescript also uses name Utility Types (in side bar it's called Global Utility Types i wonder if there are Local Utility Types??)

created time in a month

issue commentJSMonk/hegel

The concept is wrong (or I don't get it)

@Finesse in some cases this type of assignment can be useful

for example i have function that will count sum of values in array and i want to support parsing numbers from strings for convenience reasons

function countSum(arr: Array<string | number>) {
  let sum = 0
  
  for (var i = 0; i < arr.length; i++) {
    const item = arr[i]
    if (typeof item === 'string') {
      const num = parseFloat(item)
      
      if (!isNaN(num)) {
        sum += num
      }
    } else if (typeof item === 'number') {
      sum += item
    }
  }
  
  return sum;
}

const numbers: Array<number> = [1,2,4]

const sum = countSum(numbers)// Type "Array<number>" is incompatible with type "Array<number | string>"

try

in this case there will be no problem in runtime and it may be confusing as to way you get this error and problem is as mentioned that Array is passed by reference and having mutable array meaning not $Immutable<Array<string | number>> means that countSum is allowed to add new items in array and if it did then you may end up with strings in numbers array

to fix this snippet you need to make arr in countSum Immutable like so

function countSum(arr: $Immutable<Array<string | number>>) {
  let sum = 0
  
  for (var i = 0; i < arr.length; i++) {
    const item = arr[i]
    if (typeof item === 'string') {
      const num = parseFloat(item)
      
      if (!isNaN(num)) {
        sum += num
      }
    } else if (typeof item === 'number') {
      sum += item
    }
  }
  
  return sum;
}

const numbers: Array<number> = [1,2,4]

const sum = countSum(numbers)// ok

try

Finesse

comment created time in a month

Pull request review commentJSMonk/hegel

fix @hegel/language-server

 {-  "name": "hegel-language-server",+  "name": "@hegel/language-server",

i am thinking to have build folder where i have bundled code with custom package.json that has info for vsce but does not contain anything that will not be used by vsce

so that we have two manifest files one for vsce and another for yarn/npm to we avoid conflict between yarn and vsce and to have cleaner package.json where yarn does not complain about engine vscode

package.json will be for yarn and we can have extension.json for vsce that is copied to build/package.json when building code and then vsce is run in build folder

thecotne

comment created time in a month

issue commentJSMonk/hegel

Can't install VSCode extenstion

@snatvb syntax highlighting is not provided by extension ...

is this vscode with javascript syntax? maybe you have some other extension messing with js syntax?

snatvb

comment created time in a month

pull request commentJSMonk/hegel

fix @hegel/language-server

with latest changes if i open extension in debug mode it works but packaged version still does not work (i think it's an issue with dependencies)

@YevhenKap

Extension starts successfully, but on code below Hegel throw strange error.

try latest version in debug mode (make sure to install dependencies and rebuild both cli and core)

move hegel/packages/language-server/.vscode/extensions.json to hegel/.vscode/extensions.json (Its not need to be alone :) ).

it is moved see https://github.com/JSMonk/hegel/pull/260/files#diff-24c73412592dac9d8b9a739107c2c905

Also set proper paths to typings:

this was the problem after updating paths it started working in debug mode

And probably we should remove "@hegel/cli": "^0.0.43", "@hegel/core": "^0.0.43", "@hegel/typings": "^0.0.41" from language-server/package.json as it is meant to be get from npm.

all packages must explicitly list there dependencies because this is monorepo not monolith

packages are still separate it's just they are developed and tested together to ensure compatibility and to simplify implementation of features that need changes in multiple packages

thecotne

comment created time in a month

push eventthecotne/hegel

Cotne Nazarashvili

commit sha 271faf72b717536837a11339b5589ffb1be6df5a

add search.exclude in .vscode/settings.json

view details

Cotne Nazarashvili

commit sha a4c2cb994caab4f905306b827fde45077deae7f8

fix @hegel/typings's path in @hegel/language-server

view details

Cotne Nazarashvili

commit sha 6761e22e444b108e7898de9737cd1736c90a6ca3

rename hegel-language-server to @hegel/language-server

view details

push time in a month

pull request commentJSMonk/hegel

fix @hegel/language-server

everything seems fine but i can't get it working : /

this is what i got

Screen Shot 2020-05-28 at 03 31 13

and that's it no diagnostic no autocomplete no tooltips

thecotne

comment created time in a month

push eventthecotne/hegel

Cotne Nazarashvili

commit sha d047745de63ceb263f80d5d137df92c0a6557239

fix @hegel/language-server

view details

push time in a month

push eventthecotne/hegel

Yevhen

commit sha e6095f485913a247e5c062513f149dc15669818b

Merge pull request #18 from JSMonk/master Update fork

view details

Yevhen

commit sha d9659d4c1f21478619944a60f355029598d06ef4

Merge pull request #19 from JSMonk/master Update fork

view details

Yevhen

commit sha 465d9a6832eecff32750cf5c474b99a48b604f69

Merge pull request #20 from JSMonk/master Update fork

view details

Cotne Nazarashvili

commit sha cf1f31f0f223c772ac974a4ce4c4547de9383971

clean up @hegel/cli

view details

Cotne Nazarashvili

commit sha 72998cef29615c4df1f85fc7c4b51330a9638c15

update scripts in @hegel/cli

view details

Kapelianovych Yevhen

commit sha f64ec163020b175c287b4caea1ef3649ca630283

Decrease text validation timeout to 100ms.

view details

Kapelianovych Yevhen

commit sha 56898e70bcca16fc312c0e9022a1ff06828eebb0

Add description to package.

view details

Kapelianovych Yevhen

commit sha b9a9206ed3e4a0d04f141b546e4cd7ef62664586

Remove extension info for developers document.

view details

Kapelianovych Yevhen

commit sha 5c6ca5a374e807ad64af2842c42dd6eda59cd10e

Set absolute url to images as it is requirement of vsce.

view details

Kapelianovych Yevhen

commit sha 36eaeaf37b2b298642e358d426d08c37e29c2232

Fix absolute url to images.

view details

Kapelianovych Yevhen

commit sha d8712a3431eecd28233b44f61dfe2e012b8f23c8

Add icon logo. Add publisher and erpository fields to package.json.

view details

Kapelianovych Yevhen

commit sha c2aa4813cb1fb4588f40e0391296ebbac639952e

Install vsce.

view details

Kapelianovych Yevhen

commit sha a1d54c19fe2b2c65caada8975a40dde3b7a8cfe4

Commit yarn.lock

view details

Kapelianovych Yevhen

commit sha d20aae81784ff8c9a87ed19136b9a574ff8a1173

Add compile command and chaange name of the package. Fix paths of images in README.

view details

Artem Kobzar

commit sha a94172d9dd2902b9af0cb24beb4f683a61148428

Merge pull request #258 from YevhenKap/hotfix/improve-narrowing-types Add small info about extension.

view details

Cotne Nazarashvili

commit sha b4f852a9bcc3891752b76e166aa56f8bed747838

update @hegel/core tests fixes #237

view details

Artem Kobzar

commit sha cead6deb42da2257467444436282a294e6a5021a

Merge pull request #259 from thecotne/update_tests update @hegel/core tests

view details

Artem Kobzar

commit sha d048793499301a6959982c7f3b283cbfc7f5c68d

docs(Architecture Overview): add Core overview for contributors.

view details

Artem Kobzar

commit sha dec9b9d1d770342bc932f60c2c11e307b12a36b4

Merge pull request #257 from thecotne/update_cli Update @hegel/cli

view details

Cotne Nazarashvili

commit sha 0621248251a79157d2968ae87f2307eeda96520e

fix @hegel/language-server

view details

push time in a month

pull request commentJSMonk/hegel

update @hegel/core tests

@JSMonk done!

thecotne

comment created time in a month

push eventthecotne/hegel

Yevhen

commit sha e6095f485913a247e5c062513f149dc15669818b

Merge pull request #18 from JSMonk/master Update fork

view details

Yevhen

commit sha d9659d4c1f21478619944a60f355029598d06ef4

Merge pull request #19 from JSMonk/master Update fork

view details

Yevhen

commit sha 465d9a6832eecff32750cf5c474b99a48b604f69

Merge pull request #20 from JSMonk/master Update fork

view details

Kapelianovych Yevhen

commit sha f64ec163020b175c287b4caea1ef3649ca630283

Decrease text validation timeout to 100ms.

view details

Kapelianovych Yevhen

commit sha 56898e70bcca16fc312c0e9022a1ff06828eebb0

Add description to package.

view details

Kapelianovych Yevhen

commit sha b9a9206ed3e4a0d04f141b546e4cd7ef62664586

Remove extension info for developers document.

view details

Kapelianovych Yevhen

commit sha 5c6ca5a374e807ad64af2842c42dd6eda59cd10e

Set absolute url to images as it is requirement of vsce.

view details

Kapelianovych Yevhen

commit sha 36eaeaf37b2b298642e358d426d08c37e29c2232

Fix absolute url to images.

view details

Kapelianovych Yevhen

commit sha d8712a3431eecd28233b44f61dfe2e012b8f23c8

Add icon logo. Add publisher and erpository fields to package.json.

view details

Kapelianovych Yevhen

commit sha c2aa4813cb1fb4588f40e0391296ebbac639952e

Install vsce.

view details

Kapelianovych Yevhen

commit sha a1d54c19fe2b2c65caada8975a40dde3b7a8cfe4

Commit yarn.lock

view details

Kapelianovych Yevhen

commit sha d20aae81784ff8c9a87ed19136b9a574ff8a1173

Add compile command and chaange name of the package. Fix paths of images in README.

view details

Artem Kobzar

commit sha a94172d9dd2902b9af0cb24beb4f683a61148428

Merge pull request #258 from YevhenKap/hotfix/improve-narrowing-types Add small info about extension.

view details

Cotne Nazarashvili

commit sha b4f852a9bcc3891752b76e166aa56f8bed747838

update @hegel/core tests fixes #237

view details

push time in a month

issue commentJSMonk/hegel

Describe top level architecture

i think we need to setup video calls instead of youtube streams so that contributors can ask questions and we can more easily contribute to the project

it is hard to ask questions on stream because of delay (for me it's like 20 seconds before my text appears on the stream) and because i am texting and other person is speaking

for example: @JSMonk can explain project architecture in video call we can ask questions and after that we can contribute diagrams and docs etc.

artalar

comment created time in a month

issue commentJSMonk/hegel

How to write a clone function?

this works

function clone<T>(arr: Array<T>): Array<T> {
    return Array.from(arr)
}

let cloned = clone([1, 2, 3])

try

but i don't think you can copy tuples for now

also concat on empty array should work i guess

mohsen1

comment created time in a month

Pull request review commentJSMonk/hegel

fix @hegel/language-server

       "type": "extensionHost",       "request": "launch",       "runtimeExecutable": "${execPath}/client/client.js",-      "args": ["--extensionDevelopmentPath=${workspaceFolder}"]+      "args": ["--extensionDevelopmentPath=${workspaceFolder}/packages/language-server"]

well yes. if it's separate workspaces in IDE then what's a point in having single repository?

that is reason my i moved flowconfig in the root folder https://github.com/JSMonk/hegel/commit/0e760189c52b813e14c4c62622416e94fc4acbf0#diff-a9d0201e8c5bdc946e54218bb9206174

and i plan to have single eslint config, single hegelrc, etc.

that is what all other monorepos do as i know

thecotne

comment created time in a month

pull request commentJSMonk/hegel

fix @hegel/language-server

@YevhenKap

yes we use local packages but only use files from other packages that are published on npm

i want to even limit usage to only main entry of package so that file structure inside package is private and only main entry is used by other packages

thecotne

comment created time in a month

Pull request review commentJSMonk/hegel

fix @hegel/language-server

       "type": "extensionHost",       "request": "launch",       "runtimeExecutable": "${execPath}/client/client.js",-      "args": ["--extensionDevelopmentPath=${workspaceFolder}"]+      "args": ["--extensionDevelopmentPath=${workspaceFolder}/packages/language-server"]

i have moved .vscode/launch.json in root directory of repo so workspaceFolder is not hegel/packages/language-server (it's root directory of repo)

thecotne

comment created time in a month

Pull request review commentJSMonk/hegel

fix @hegel/language-server

-const { getConfig } = require("@hegel/cli/lib/config");-const { importModule } = require("@hegel/cli/lib/module");+const { getConfig } = require("@hegel/cli/build/lib/config");+const { importModule } = require("@hegel/cli/build/lib/module"); const { getBabylonAST } = require("../utils/document-ast"); const { createGlobalScope } = require("@hegel/core");

no it's correct see https://github.com/JSMonk/hegel/blob/master/packages/core/package.json#L6

thecotne

comment created time in a month

issue commentJSMonk/hegel

Can't install VSCode extenstion

@YevhenKap no after yarn it uses local packages (except @hegel/typings as it's broken)

well it should use local packages if it's configured correctly

snatvb

comment created time in a month

issue commentJSMonk/hegel

Can't install VSCode extenstion

it was failing to start for me because of change in file structure of @hegel/core

this is my fix but it still does not exactly work https://github.com/JSMonk/hegel/pull/260/files#diff-d73f388b124308df3ed9c8993f08f40bL1-R3

snatvb

comment created time in a month

PR opened JSMonk/hegel

fix @hegel/language-server

this needs to be updated after #257 is merged

also does not work for reasons beyond my comprehension :D

+10 -16

0 comment

6 changed files

pr created time in a month

create barnchthecotne/hegel

branch : fix_language_server

created branch time in a month

issue commentJSMonk/hegel

Can't install VSCode extenstion

apparently i broke it in #252

now i am trying to fix it and i got it in a state where it does not report any errors but still does not work : /

snatvb

comment created time in a month

push eventthecotne/hegel

Cotne Nazarashvili

commit sha 358bc3f3bf213c6df88f7ff1f310b43f909810d9

update @hegel/core tests fixes #237

view details

push time in a month

PR opened JSMonk/hegel

update @hegel/core tests fixes #237
+615 -592

0 comment

9 changed files

pr created time in a month

create barnchthecotne/hegel

branch : update_tests

created branch time in a month

issue commentJSMonk/hegel

Cannot read property '0' of undefined

@karimsa yes. after this #252 and this #256 hegel playground is running on master (it was last published version before if i am not mistaken)

so it works on playground but not on latest published version...

karimsa

comment created time in a month

PR opened JSMonk/hegel

Update @hegel/cli
  • remove lib folder in src
  • remove package.json from src
  • update scripts in package.json to match @hegel/core
+21 -61

0 comment

10 changed files

pr created time in a month

create barnchthecotne/hegel

branch : update_cli

created branch time in a month

issue commentthecotne/state-of-js-type-systems

Alternative typesystems for JS not mentioned

@unlight does not look similar to hegel to me. it has very weird template tag based syntax and it's a type linter with configurable rules of type system

Raynos

comment created time in a month

issue commentthecotne/state-of-js-type-systems

Alternative typesystems for JS not mentioned

also if we mention compile to js projects then there are bunch of those

  • https://nim-lang.org/
  • https://haxe.org/
  • https://reasonml.github.io/
  • https://bucklescript.github.io/
  • https://www.scala-js.org/
  • https://github.com/ghcjs/ghcjs
  • https://www.purescript.org/
  • https://elm-lang.org/
  • https://dart.dev/
  • https://kotlinlang.org/

and this is not all see

  • https://github.com/jashkenas/coffeescript/wiki/List-of-languages-that-compile-to-JS
  • https://smurfpandey.github.io/altjs/
Raynos

comment created time in a month

PR opened JSMonk/hegel

fix deploy docs
+3 -2

0 comment

2 changed files

pr created time in a month

create barnchthecotne/hegel

branch : fix_deploy_docs

created branch time in a month

issue commentJSMonk/hegel

separate projects for playground and docs

also we can replace playground with Theia IDE it's basically highly configurable VS Code Online (i have zero experience with it but most likely it's easier to configure to use language server then barebones Monaco Editor)

thecotne

comment created time in a month

issue commentJSMonk/hegel

Can you provide contribution documentation on how to use the monorepo ?

@Raynos should be straight forward to work on this project after #252 is merged.

checkout updated "Building Hegel from source" section

Raynos

comment created time in a month

push eventthecotne/hegel

Cotne Nazarashvili

commit sha 0e760189c52b813e14c4c62622416e94fc4acbf0

use yarn instead of rush

view details

push time in a month

Pull request review commentJSMonk/hegel

use yarn instead of rush

+{+  "private": true,+  "scripts": {+    "test": "yarn workspace @hegel/core test",+    "build": "yarn build:core && yarn build:cli",+    "build:core": "yarn workspace @hegel/core build",+    "build:cli": "yarn workspace @hegel/cli build"+  },+  "workspaces": [+    "packages/cli",+    "packages/core",+    "packages/docs",+    "packages/language-server",+    "_packages/typings"

@JSMonk this underscore is quick fix for this #247

thecotne

comment created time in a month

push eventthecotne/hegel

Cotne Nazarashvili

commit sha 0fbc7d32b31e5f2ba7f884dcd23ae9a529cc64c3

use yarn instead of rush

view details

push time in a month

push eventthecotne/hegel

Cotne Nazarashvili

commit sha b6926a1f585634fc165dce156b20c8c5b1b703e8

use yarn instead of rush

view details

push time in a month

push eventthecotne/hegel

Cotne Nazarashvili

commit sha b0d18b930a6b2d25aa0222f4baadef59171457eb

use yarn instead of rush

view details

push time in a month

issue openedJSMonk/hegel

separate projects for playground and docs

if we split docs and playground in separate projects docs can be migrated to use hegel as well and also codebase for docs can be much simpler then it is right now

we can have https://try.hegel.js.org or leave https://hegel.js.org/try as is

created time in a month

issue commentthecotne/state-of-js-type-systems

Alternative typesystems for JS not mentioned

i don't want to add any of those in comparison tables but i am open to mention them in first section after ... in TypeScript by microsoft. before Besides those there is new kid ...

  • JS++ is not js
  • Closure compiler is basically uglify pretending to be type checker :D
  • JSig and Infernu are dead as i know and never got traction

feel free to send PR

Raynos

comment created time in a month

PR opened JSMonk/hegel

use yarn instead of rush
+164581 -63776

0 comment

28 changed files

pr created time in a month

push eventthecotne/hegel

Raynos

commit sha f50d4ca940745531936527067cdde76b941552b4

chore: Update package-lock.json The package-lock.json will write these optional fields sometimes. I think this is when two developers have different versions of npm, maybe only recent versions of npm add the optional: true field to the package-locks.json. This was run with npm version 6.14.5

view details

Raynos

commit sha 5cf291367098224640d343661dc28c9a1ba33f7a

fix: Update package-lock The package-lock in cli is pointing to an old version of core & typings. This updates them to the latest versions.

view details

Raynos

commit sha ab0def160ea2d65fe4fe009bed896e1566161595

chore: Update package-lock.json Different versions of npm will write this optional true field or not. I don't think its necessary. Generation of package-lock is only deterministic when using the same version of npm among multiple developers. This package-lock was generated with npm v6.14.5

view details

Raynos

commit sha 57e6e3189183661202c61b18fe2d7f1570fd1b5f

chore: Add npm run build:watch Add a helper command to run babel in watch mode whilst developing the core / cli together.

view details

Raynos

commit sha f06049d3adf12ff5b1c1083957971e784ea91f11

chore: Copy README so its published to npm. This copies the main README into the build directory so that at publish time it's included in the npm tarball.

view details

Artem Kobzar

commit sha 911ae63103e892266f6442073ccf273215720f8f

Merge pull request #251 from Raynos/include-readme Add README to build directory and npm package.

view details

Cotne Nazarashvili

commit sha ae8439d6460f7cb53fd9fac6144baa1c4e9bf1b0

use yarn instead of rush

view details

push time in a month

create barnchthecotne/hegel

branch : use_yarn

created branch time in a month

issue commentdoczjs/docz

TypeError: `mergeWith` is not a function

you need to install docz-utils@^2.3.0 separately and it will work ... (latest version for now is 2.3.0)

inlet

comment created time in a month

issue commentromejs/rome

typescript syntax in js files

type Obj = {
  name: string
}

function name(obj: Obj): string {
  return obj.name
}

console.log(name({ name: 'sdsds' }))

Screen Shot 2020-05-24 at 02 51 30

thecotne

comment created time in a month

issue openedromejs/rome

typescript syntax in js files

typescript syntax is supported in js files and it gives false impression that flow is supported and/or somehow it's correct js syntax

created time in a month

issue commentJSMonk/hegel

Documentation: No mention of records in object

@JSMonk well objects with arbitrary keys sounds like a bad idea but Array is a object and a collection and we are okay with it

both flow and typescript supports this and it's common pattern in js so you really need to consider supporting it

Raynos

comment created time in a month

issue commentJSMonk/hegel

require explicit check for undefined?

i think that this would report error

const nums: Array<number> = [0,1,2,3,4,5]

for (let i=0; i<nums.length; i++) {
  const n = nums[i]
  n && useNum(n)// should report: Type "number | undefined" is incompatible with type "boolean"
}

function useNum(n: number) {
  n
}

like this does

const nums: Array<number> = [0,1,2,3,4,5]

for (let i=0; i<nums.length; i++) {
  const n = nums[i]
  if (n) useNum(n)// reports: Type "number | undefined" is incompatible with type "boolean"
}

function useNum(n: number) {
  n
}

i think && and || are boolean operators (and you should not be allowed to use it otherwise)

trusktr

comment created time in a month

issue commentJSMonk/hegel

Incorrect refinement using `instanceof`

you should not be able to extend class and change signature/type of existing functions

both typescript and flow do this

try typescript try flow

vkurchatkin

comment created time in a month

issue commentJSMonk/hegel

Unsound type inference with arithmetic operators

it's not inference problem inference is 100% legit

let f = <T: string | number>(a: T, b: T) => a + b

const a: string | number = 1
const b: string | number = 'cotne'

void f(a, b) // should error and does not

try

but generics should not allow usage of unions

because while function accepts both string and number it does not accepts both of them at same time if it did then generics are not needed

vkurchatkin

comment created time in a month

issue commentJSMonk/hegel

the "is" keyword

@JSMonk you should allow developer to specify what he/she wants to refine to so refinement it self can be checked against expectation of a developer

for example

function isNumber<T>(n: T): $Refine<T, number>  {
  return typeof n === 'string'// error
}

function isString<T>(n: T): $Refine<T, string> {
  return typeof n === 'string'// ok
}

declare class Array {
  static isArray<T>(T): $Refine<T, Array>
}

of course inference of $Refine would be super cool but developer needs to be able to specify intent

trusktr

comment created time in a month

issue openedJSMonk/hegel

Function should return something with type "true"

class User { }

function giveMeUser(user: User): true {
  if (user instanceof User) {
    return true
  }

  return true
}

try

created time in a month

issue commentJSMonk/hegel

typescript non-goal is *provably correct* not *probably correct*

copy past quote was updated in this commit https://github.com/JSMonk/hegel/commit/620b135469bd28c4ae6420333fd951206c42487d#diff-348867911e6a15bef82fdd2a4ef49f79

jamesmanning

comment created time in a month

PR opened JSMonk/hegel

fix typo (provably correct not probably correct) fixes #214
+6 -6

0 comment

1 changed file

pr created time in a month

create barnchthecotne/hegel

branch : issue-214

created branch time in a month

startedcognitom/paper-css

started time in 2 months

push eventthecotne/stateless-app

Cotne Nazarashvili

commit sha d1229040aeccc0b453ec8abf5c9b59ee006349fa

yarn upgrade

view details

Cotne Nazarashvili

commit sha ecbe97cc8377a1d5efad1f262a2e8c1dcd6ebe22

update effector wrapper

view details

push time in 2 months

issue openedfacebook/flow

empty type is treated as any

Flow version: 0.125.1

Expected behavior

empty to behave like mixed (does not cast to anything only refinements are allowed)

Actual behavior

empty is basically alias to any

code

declare var nothing: empty
declare var something: 'cotne'

declare function giveMeNumber(number): void


giveMeNumber(1)// ok
giveMeNumber('cotne')// error as expected

giveMeNumber(nothing)// should error

if (something !== 'cotne') {
  giveMeNumber(something)// should error
}

Try

created time in 2 months

PR opened thecotne/stateless-app

Hegel
+186 -36

0 comment

8 changed files

pr created time in 2 months

push eventthecotne/stateless-app

Cotne Nazarashvili

commit sha c3cf9d8059e1fa0e268fa2249e04d044b9beed40

¯\_(ツ)_/¯

view details

Cotne Nazarashvili

commit sha 23f027e42cd98f0b652b8b2be96fad53dea8e795

add hegel

view details

Cotne Nazarashvili

commit sha 8023220e645e2937be23aa3dae24026d83e6e0fa

fix hegelrc

view details

Cotne Nazarashvili

commit sha 13f3d9b9a384f148f50746950c4de024764b169e

update some files

view details

push time in 2 months

push eventthecotne/stateless-app

Cotne Nazarashvili

commit sha c3cf9d8059e1fa0e268fa2249e04d044b9beed40

¯\_(ツ)_/¯

view details

push time in 2 months

PR closed thecotne/stateless-app

add hegel
+20 -31

0 comment

7 changed files

thecotne

pr closed time in 2 months

push eventthecotne/stateless-app

Cotne Nazarashvili

commit sha ac063ddb202df15513b5c9a134eed91847b47fb3

¯\_(ツ)_/¯

view details

push time in 2 months

push eventthecotne/stateless-app

Cotne Nazarashvili

commit sha 33f0bcca869a87e882e652b767fc9b856837071d

update some files

view details

push time in 2 months

more