Skip to content

Commit

Permalink
Improve type and release flow
Browse files Browse the repository at this point in the history
  • Loading branch information
ericmatte committed Sep 17, 2024
1 parent 492ad8d commit 478afd2
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 8 deletions.
5 changes: 1 addition & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,5 @@
node_modules
dist
coverage
.npmrc

I18n.d.ts
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
//registry.npmjs.org/:_authToken=${NPM_TOKEN}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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": {
Expand Down
2 changes: 1 addition & 1 deletion src/createDefinitionFile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<string, unknown> | undefined;
};
declare var I18n: I18n;
Expand Down
2 changes: 1 addition & 1 deletion tests/I18n.expected.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<string, unknown> | undefined;
};

declare var I18n: I18n;
Expand Down

0 comments on commit 478afd2

Please sign in to comment.