profile
viewpoint
Teppei Sato teppeis @cybozu / @kintone Tokyo 🍛 + 🍻 = 👍

teppeis/closure-library.d.ts 15

Closure Library declaration file (d.ts) for TypeScript

teppeis/bind.ts 14

Function.prototype.bind with typings for TypeScript

cybozu/duck 12

Builder and dev server for Google Closure Compiler, Library and Templates. An alternative to plovr.

teppeis/closure-chrome-extension-template 7

Fork of http://code.google.com/p/closure-chrome-extension-template/

closure-gun/closure-gun 5

Make faster Google Closure Compiler for Node.JS :gun:

teppeis/closure-compiler-cli 3

Thin CLI wrapper for `google-closure-compiler`

teppeis/closure-boilerplate 1

Fork of https://github.com/jankuca/closure-boilerplate

teppeis/closure-compiler-es-compat-table 1

ECMAScript compatibility checker for Closure Compiler

teppeis/closure-externs-mocha 1

Mocha externs for Closure Compiler.

pull request commentkintone/js-sdk

feat: support --base-url and KINTONE_BASE_URL

Thank for the good feedbacks!!! 🎉 🎉 🎉

koba04

comment created time in an hour

issue commentgoogle/closure-compiler

Incorrect removal property from object accessed in nested conditions

@blickly thanks for your reply. It sounds like you're implying it's by design?

However it fails under such a specific pattern that I can't help but think it's a bug. E.g. swap the if with a ? and it doesn't collapse:

const X = {Y: 1};

function fn(a) {
    if (a) {
       if (a) {
          return  X;
       } else {
          return {};
       }
    }
}

Or introduce a variable, and it works as expected:

const X = {Y: 1};

function fn(a) {
    if (a) {
        const b = a ? X : {};
        return b;
    }
}

but in the shorter term the best workaround I know of is use the /** @nocollapse */ annotation

In a code base with millions of lines of code, and hundreds of developers thats not really an option unless it is very clear what the pattern of incorrect use is. With strings vs dot properties we can say don't mix the two, but not sure how to communicate the anti-pattern that triggers this issue.

As far we know we could be hitting this problem hundreds of times in our code base, and only know when on of our users executes the code in production.

WearyMonkey

comment created time in an hour

push eventkintone/js-sdk

Toru Kobayashi

commit sha 9316fd913adfad949274a886ed009a85536b6919

feat: support --base-url and KINTONE_BASE_URL (#536) * feat: support --base-url and KINTONE_BASE_URL * refactor: create cli-parser replacing with createCommandProgram * refactor: remove unnecessary export type * test: add a test for the validation of baseUrl * refactor: simplify the error message * refactor: handle uncaughtException for better error message * Apply suggestions from code review Co-authored-by: Masashi Hirano <shisama07@gmail.com> * test: rename a test file name and fix a failed test * test: add an assertion for typeName * fix: build error * refactor: stop exposing unrelated properties Co-authored-by: Masashi Hirano <shisama07@gmail.com>

view details

push time in 3 hours

delete branch kintone/js-sdk

delete branch : add-base-url-support-into-dts-gen

delete time in 3 hours

PR merged kintone/js-sdk

Reviewers
feat: support --base-url and KINTONE_BASE_URL

<!-- Thank you for sending a pull request! -->

Why

<!-- Why do you want the feature and why does it make sense for the package? -->

This is a part of #530.

What

<!-- What is a solution you want to add? --> I've added --base-url option and support the KINTONE_BASE_URL environment value. I've also replaced createCommanderProgram with cli-parser to encapsulate the logic for parsing the process.argv into cli-parser.

How to test

<!-- How can we test this pull request? -->

Checklist

  • [x] Read CONTRIBUTING.md
  • [x] Updated documentation if it is required.
  • [x] Added tests if it is required.
  • [x] Passed yarn lint and yarn test on the root directory.
+237 -155

1 comment

9 changed files

koba04

pr closed time in 3 hours

Pull request review commentkintone/js-sdk

feat: support --base-url and KINTONE_BASE_URL

 export function createCommanderProgram() {             "fields.d.ts"         ); -    return program;+    const parsedArgs = program.parse(argv);++    const baseUrl = parsedArgs.baseUrl || parsedArgs.host;+    if (baseUrl === null) {+        throw new Error(+            "--base-url (KINTONE_BASE_URL) must be specified"+        );+    }++    return {+        ...parsedArgs,+        baseUrl,+    } as any;

That's a good point. I've fixed it. 👍

koba04

comment created time in 3 hours

push eventkintone/js-sdk

Toru Kobayashi

commit sha 94e4111ed36ad2c486ef7af7135bd7c2d7d0ecc4

refactor: stop exposing unrelated properties

view details

push time in 3 hours

startedSamVerschueren/tsd-typescript

started time in 3 hours

issue commentgoogle/closure-templates

Using a variable in a link href

To reproduce locally, checkout commit https://github.com/robfig/closure-templates/commit/caaba741453ba6fe546c77ed67ed4750ad51dd2b and run bazel run :CompileSoy --pwd/test.soy from the repo root.

robfig

comment created time in 4 hours

issue openedgoogle/closure-templates

Using a variable in a link href

This template:

{namespace main}

{template .main}
{@param appName: string}
    <link rel="stylesheet"
          type="text/css"
          href="/{$appName}/public/stylesheets/styles.css">
{/template}

Fails to compile with this error:

/Users/robfig/closure-templates/test.soy:7: error: Invalid or ambiguous syntax prevents Soy from escaping this template correctly:
- TrustedResourceUris containing dynamic content must have a fixed scheme (https) and host using one of the following formats:
  * https://foo/
  * //foo/
  * /foo
or move the calculation of this URL outside of the template and use an ordaining API.
7:           href="/{$appName}/public/stylesheets/styles.css">
                   ^

I don't understand why -- it is exactly the third format mentioned in the error message. What am I doing wrong?

created time in 4 hours

Pull request review commentkintone/js-sdk

feat: support --base-url and KINTONE_BASE_URL

 export function createCommanderProgram() {             "fields.d.ts"         ); -    return program;+    const parsedArgs = program.parse(argv);++    const baseUrl = parsedArgs.baseUrl || parsedArgs.host;+    if (baseUrl === null) {+        throw new Error(+            "--base-url (KINTONE_BASE_URL) must be specified"+        );+    }++    return {+        ...parsedArgs,+        baseUrl,+    } as any;

BTW, the parsedArgs variable has properties that ParsedArgs does not have. For example, host. Is it OK to destructure the object (...parsedArgs)?

koba04

comment created time in 4 hours

push eventtc39/proposals

Long Ho

commit sha 074cc08fde9ff170f04df2e7630f9d7ce825c907

add `Intl.bestAvailableLocale` proposal to stage 0 @sffc @zbraniecki

view details

Long Ho

commit sha a1b3be7f152d3984896bb6624c39333708aa365a

Update stage-0-proposals.md

view details

Septs

commit sha 6f77ae98795e4841c91d678ac80ec59b9927ffcb

Merge pull request #329 from longlho/patch-1 add `Intl.bestAvailableLocale` proposal to stage 0

view details

push time in 4 hours

PR merged tc39/proposals

add `Intl.bestAvailableLocale` proposal to stage 0

@sffc @zbraniecki

+2 -0

0 comment

1 changed file

longlho

pr closed time in 4 hours

push eventtc39/proposals

Frank Yung-Fong Tang

commit sha afbf358db1812e6e6d03f2d073acabef074e6191

add eradisplay @sffc @Louis-Aime

view details

Frank Yung-Fong Tang

commit sha 37d90184fc6b67ac06ce4fc4622d05c57163925c

Update ecma402/stage-0-proposals.md Co-authored-by: Septs <github@septs.pw>

view details

Frank Yung-Fong Tang

commit sha 28cd98965ee26b43b3ce98243e8b0fbb3335bad8

Merge pull request #328 from tc39/FrankYFTang-patch-3 add eradisplay to stage 0 of ECMA402

view details

push time in 4 hours

delete branch tc39/proposals

delete branch : FrankYFTang-patch-3

delete time in 4 hours

PR merged tc39/proposals

add eradisplay to stage 0 of ECMA402

@sffc @Louis-Aime @gibson042 @leobalter @zbraniecki

+2 -0

0 comment

1 changed file

FrankYFTang

pr closed time in 4 hours

push eventtc39/proposals

Frank Yung-Fong Tang

commit sha 37d90184fc6b67ac06ce4fc4622d05c57163925c

Update ecma402/stage-0-proposals.md Co-authored-by: Septs <github@septs.pw>

view details

push time in 4 hours

Pull request review commentkintone/js-sdk

feat: support --base-url and KINTONE_BASE_URL

 export function createCommanderProgram() {             "fields.d.ts"         ); -    return program;+    const parsedArgs = program.parse(argv);++    const baseUrl = parsedArgs.baseUrl || parsedArgs.host;+    if (baseUrl === null) {+        throw new Error(+            "--base-url (KINTONE_BASE_URL) must be specified"+        );+    }++    return {+        ...parsedArgs,+        baseUrl,+    } as any;

Oh, sorry. I've tried this now on my local and I realized this is wrong.

koba04

comment created time in 4 hours

PR opened tc39/proposals

add `Intl.bestAvailableLocale` proposal to stage 0

@sffc @zbraniecki

+2 -0

0 comment

1 changed file

pr created time in 4 hours

PR opened kintone/js-sdk

Support oauth customize uploader

<!-- Thank you for sending a pull request! -->

Why

<!-- Why do you want the feature and why does it make sense for the package? -->

What

<!-- What is a solution you want to add? -->

How to test

<!-- How can we test this pull request? -->

Checklist

  • [x] Read CONTRIBUTING.md
  • [x] Updated documentation if it is required.
  • [ ] Added tests if it is required.
  • [x] Passed yarn lint and yarn test on the root directory.
+53 -11

0 comment

9 changed files

pr created time in 5 hours

push eventkintone/js-sdk

chick-p

commit sha 4e19ef2c80522e778cc59d430f8748e95ee94e20

feat: support environment variable for oauth token of customize-uploader

view details

chick-p

commit sha fc40528ddb1528b3fa0972d698baa12c1e42b4af

test: fix test

view details

chick-p

commit sha 8aa415714df814d1522469668740f58a05c18181

docs: write description about an option of oAuth token in customize-uploader

view details

chick-p

commit sha 087773d012829a785847225d4ca1e951ddf47b16

docs: write required scopes

view details

push time in 5 hours

pull request commentkintone/js-sdk

feat: support --base-url and KINTONE_BASE_URL

@shisama Thank you for your review 🌟 I've addressed the points you've pointed out!

koba04

comment created time in 5 hours

Pull request review commentkintone/js-sdk

feat: support --base-url and KINTONE_BASE_URL

 export function createCommanderProgram() {             "fields.d.ts"         ); -    return program;+    const parsedArgs = program.parse(argv);++    const baseUrl = parsedArgs.baseUrl || parsedArgs.host;+    if (baseUrl === null) {+        throw new Error(+            "--base-url (KINTONE_BASE_URL) must be specified"+        );+    }++    return {+        ...parsedArgs,+        baseUrl,+    } as any;

👍 Unfortunately, the type cannot be casted to ParsedArgs directly because the type of parsedArgs is commander.Command, so I've casted the type at the program.parse(). https://github.com/kintone/js-sdk/pull/536/commits/3d3f6bb541d2fb303f0da5ccd45c3e007684d7b6#diff-75257f38fd4cf6ea78b0699d85fb15d6e6a998407380ff314282ce47948ae580R101-R104

koba04

comment created time in 5 hours

Pull request review commenttc39/proposals

add eradisplay to stage 0 of ECMA402

 Stage 0 proposals are either | -------------------------------------------------------------------- | ---------------- | ------------------ | | [Fix 9.2.3 LookupMatcher algorithm][]                                | Rafael Xavier    | Rafael Xavier      | | [`Intl.NumberFormat` `round` option][intl.numberformat round option] | Rafael Xavier    | Rafael Xavier      |+| [eraDisplay option for Intl.DateTimeFormat][eradisplay]              | Louis-Aime       | Louis-Aime         |
| [eraDisplay option for `Intl.DateTimeFormat`][eradisplay]              | Louis-Aime       | Louis-Aime         |
FrankYFTang

comment created time in 5 hours

push eventkintone/js-sdk

Toru Kobayashi

commit sha 3d3f6bb541d2fb303f0da5ccd45c3e007684d7b6

fix: build error

view details

push time in 5 hours

startedthought-machine/please

started time in 5 hours

PR opened tc39/proposals

add eradisplay to stage 0 of ECMA402

@sffc @Louis-Aime @gibson042 @leobalter @zbraniecki

+2 -0

0 comment

1 changed file

pr created time in 5 hours

create barnchtc39/proposals

branch : FrankYFTang-patch-3

created branch time in 5 hours

push eventkintone/js-sdk

Toru Kobayashi

commit sha b49a80eeaf75de4eb0a25f852fe61a273b42da21

test: rename a test file name and fix a failed test

view details

Toru Kobayashi

commit sha bbdaa79edb8e151003df5ec2981f4bef0d9ce259

test: add an assertion for typeName

view details

push time in 5 hours

more