Skip to content

Commit

Permalink
fix: 🐛 update deps and improve build output
Browse files Browse the repository at this point in the history
  • Loading branch information
streamich committed Sep 22, 2024
1 parent 6509c0a commit aafe7b0
Show file tree
Hide file tree
Showing 4 changed files with 5,534 additions and 4,321 deletions.
23 changes: 2 additions & 21 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,29 +29,22 @@
"url": "https://github.com/streamich/use-t/issues"
},
"homepage": "https://github.com/streamich/use-t#readme",
"dependencies": {
"tiny-invariant": "^1.0.4"
},
"devDependencies": {
"@types/react": "^16.8.12",
"@babel/core": "^7.4.3",
"@semantic-release/changelog": "^3.0.1",
"@semantic-release/git": "^7.0.5",
"@semantic-release/npm": "^5.0.5",
"@storybook/react": "^4.0.2",
"@types/node": "^11.13.0",
"@types/react": "^16.8.12",
"babel-core": "^6.26.3",
"babel-loader": "^8.0.4",
"callbag-interval": "^1.1.0",
"gh-pages": "^2.0.1",
"react": "^16.8.6",
"react-dom": "^16.8.6",
"react-spring": "^6.1.6",
"rimraf": "^2.6.2",
"rxjs": "^6.3.3",
"semantic-release": "^15.10.7",
"ts-loader": "^5.3.3",
"ts-node": "^8.0.3",
"tslib": "^2.7.0",
"typescript": "^3.7.2"
},
"peerDependencies": {
Expand All @@ -62,17 +55,5 @@
"commitizen": {
"path": "git-cz"
}
},
"release": {
"verifyConditions": [
"@semantic-release/changelog",
"@semantic-release/npm",
"@semantic-release/git"
],
"prepare": [
"@semantic-release/changelog",
"@semantic-release/npm",
"@semantic-release/git"
]
}
}
2 changes: 0 additions & 2 deletions src/createTranslations.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import * as React from 'react';
import {ProviderProps, ProviderState, TransProps, Result, UseT, TranslatorFn, WithT} from './types';
import invariant from 'tiny-invariant';

const {createContext, createElement, Fragment} = React;

Expand Down Expand Up @@ -74,7 +73,6 @@ export const createTranslations = (ns: string = 'main'): Result => {
if (!this.state.map[locale][ns]) {
this.state.map[locale][ns] = {};
this.setState({...this.state});
invariant(!!this.props.loader, 'use-t provider .loader() prop not set.');
const translations = await this.props.loader!(locale, ns);
this.state.map[locale][ns] = translations;
this.setState({...this.state});
Expand Down
1 change: 1 addition & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"noImplicitReturns": true,
"noImplicitAny": false,
"noFallthroughCasesInSwitch": true,
"importHelpers": true,
"outDir": "lib",
"lib": ["es2018", "dom"]
},
Expand Down
Loading

0 comments on commit aafe7b0

Please sign in to comment.