diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 8d1f7ad..6f8c635 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -44,10 +44,7 @@ jobs: echo '::set-output name=should_publish::true' fi - - name: npm publish - run: | - echo '//registry.npmjs.org/:_authToken=${NPM_TOKEN}' > .npmrc - npm publish + - run: npm publish if: steps.check.outputs.should_publish == 'true' env: NPM_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/.gitignore b/.gitignore index 85dd2cf..83a5791 100644 --- a/.gitignore +++ b/.gitignore @@ -4,6 +4,5 @@ node_modules dist coverage -.npmrc I18n.d.ts diff --git a/.npmrc b/.npmrc new file mode 100644 index 0000000..ae64359 --- /dev/null +++ b/.npmrc @@ -0,0 +1 @@ +//registry.npmjs.org/:_authToken=${NPM_TOKEN} diff --git a/package.json b/package.json index c3230ca..36d3f2f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "i18n-typedef", - "version": "1.2.3", + "version": "1.2.4", "description": "Convert I18n translation files to TypeScript definitions", "author": "Agendrix", "repository": { diff --git a/src/createDefinitionFile.ts b/src/createDefinitionFile.ts index 04bade1..9b83d8e 100644 --- a/src/createDefinitionFile.ts +++ b/src/createDefinitionFile.ts @@ -67,7 +67,7 @@ type I18n = { toHumanSize(number: number, options?: I18n.NumberOptions): string; /** Find and process the translation using the provided scope and options. */ - lookup(scope: string): string | undefined; + lookup(scope: string): string | string[] | Record | undefined; }; declare var I18n: I18n; diff --git a/tests/I18n.expected.d.ts b/tests/I18n.expected.d.ts index 0eff945..c1b0974 100644 --- a/tests/I18n.expected.d.ts +++ b/tests/I18n.expected.d.ts @@ -88,7 +88,7 @@ type I18n = { toHumanSize(number: number, options?: I18n.NumberOptions): string; /** Find and process the translation using the provided scope and options. */ - lookup(scope: string): string | undefined; + lookup(scope: string): string | string[] | Record | undefined; }; declare var I18n: I18n;