Skip to content

Commit

Permalink
v8.0.0 (i18next#965)
Browse files Browse the repository at this point in the history
* Core changes to support NextJs v10

* Add default config file reading functionality

* Reimplement hoistNonReactStatics

* Update dependencies

* Strip out tests and unnecessary dependencies

* Fix linting setup

* Upgrade core dependencies

* Migrate config options to mirror NextJs

* v8.0.0-beta.0

* Remove deprecated config options and types

* Update example lockfile

* Remove need for locales and defaultLocale entirely

* Update example to use hooks

* Add documentation

* v8.0.0-beta.1

* Add NodeJs v14 to CircleCI

* Create serverSideTranslations.d.ts

* v8.0.0-beta.2

* fix: TS issues for v8-beta (i18next#922)

* fix: export appWithTranslation type

also changed AppWithTranslation type: param is a React Component, not a React Component instance

* chore: remove unused NextI18Next exports

* fix: run-example prod script by adding the build step before it

* v8.0.0-beta.3

* fix: Remove server side code from client bundle (i18next#926)

* Remove static dir entirely

* v8.0.0-beta.4

* feat: Add an ESM entry point to allow better bundle optimizations (i18next#937)

* Add an ESM entry point to allow better tree-shaking & module concatenation

* Include ie11

* fix: added Trans to TS definition v8-beta (i18next#951)

* added Trans to types

* fix: removed unused typess

* refactor: Use serialize-javascript (i18next#954)

* refactor: Use NextJs i18n config API (i18next#955)

* test: Add tests for config and consoleMessage (i18next#956)

* test: Add coverage for createClient (i18next#957)

* refactor: Update eslint config (i18next#958)

* refactor: Update eslint config

* Fix lint

* test: Add e2e coverage via Cypress (i18next#959)

* feat: Disable FS backend when user provides one (i18next#930)

* feat: Disable FS backend when user provides one

* fixup! feat: Disable FS backend when user provides one

* fixup! feat: Disable FS backend when user provides one

* fixup! feat: Disable FS backend when user provides one

* test: Add test coverage to appWithTranslation and serverSideTranslations (i18next#960)

* docs: Update README (i18next#961)

* v8.0.0-beta.5

* docs: Update README (i18next#962)

* v8.0.0-beta.6

* chore: Update example lockfile (i18next#964)

* chore: Update example lockfile

* Update package.json

* fix: Deep merge options.backend, closes i18next#848 (i18next#849)

* fix: Make create-config defaultFile use localeStructure (i18next#966)

use @cescoallegrini modifications from
i18next#934

* Update README.md

Co-authored-by: Léonard Drouillas <leonard.drouillas@gmail.com>

* chore: Lint examples dir (i18next#969)

* fix: Add server side loading of fallbackLng (i18next#970)

* refactor: Remove i18next-http-backend (i18next#971)

* refactor: Remove i18next-http-backend

* Update config.yml

* Update basic.e2e.ts

* refactor: Add react-i18next useSuspense (i18next#973)

* docs: Update README (i18next#975)

* refactor: Add typeof window check to createConfig (i18next#976)

* refactor: Remove serialize-javascript and add configOverride to appWithTranslation (i18next#972)

* refactor: Remove serialize-javascript and add configOverride to appWithTranslation

* Add serializeConfig option

* Add docs

* Update README.md

* docs: Update README (i18next#977)

* Update peerDependencies and version

Co-authored-by: Francesco Moro <franzmoro@users.noreply.github.com>
Co-authored-by: Felix Mosheev <9304194+felixmosh@users.noreply.github.com>
Co-authored-by: Tobias Koller <34249734+TKone7@users.noreply.github.com>
Co-authored-by: Filipe Medeiros <filipesilvamedeiros@gmail.com>
Co-authored-by: Léonard Drouillas <leonard.drouillas@gmail.com>
  • Loading branch information
6 people committed Feb 24, 2021
1 parent 349d756 commit 7c12340
Show file tree
Hide file tree
Showing 115 changed files with 7,090 additions and 11,171 deletions.
40 changes: 13 additions & 27 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,42 +3,22 @@ commands:
build-and-test:
steps:
- checkout
- run:
name: Install rsync
command: sudo apt install rsync
- restore_cache:
name: Restore cache (main)
keys:
- v1-dependencies-{{ checksum "package.json" }}
- restore_cache:
name: Restore cache (example)
keys:
- v1-dependencies-{{ checksum "examples/simple/package.json" }}
- run:
name: Install dependencies (main)
command: yarn install
- run:
name: Build source (main)
command: yarn build
- run:
name: Build source (example)
command: yarn build:examples/simple
- save_cache:
name: Save cache (main)
paths:
- node_modules
key: v1-dependencies-{{ checksum "package.json" }}
- save_cache:
name: Save cache (example)
paths:
- examples/simple/node_modules
key: v1-dependencies-{{ checksum "examples/simple/package.json" }}
- run:
name: Lint
command: yarn lint
- run:
name: Test
command: yarn test
- run:
name: e2e
command: yarn test:e2e
- store_artifacts:
path: cypress/screenshots
- store_artifacts:
path: cypress/videos

jobs:
node-v10:
Expand All @@ -51,9 +31,15 @@ jobs:
- image: circleci/node:12-browsers
steps:
- build-and-test
node-v14:
docker:
- image: circleci/node:14-browsers
steps:
- build-and-test

workflows:
node-multi-build:
jobs:
- node-v10
- node-v12
- node-v14
3 changes: 0 additions & 3 deletions .eslintignore

This file was deleted.

55 changes: 0 additions & 55 deletions .eslintrc

This file was deleted.

147 changes: 147 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,147 @@
{
"parser": "@typescript-eslint/parser",
"plugins": [
"@typescript-eslint",
"eslint-plugin-import",
"typescript-sort-keys",
"prefer-arrow"
],
"extends": [
"eslint:recommended",
"plugin:react/recommended",
"plugin:@typescript-eslint/recommended",
"plugin:jest/recommended",
"plugin:jest/style",
"plugin:typescript-sort-keys/recommended"
],
"ignorePatterns": [
"**/node_modules/*",
"**/out/*",
"**/.next/*",
"**/*package.json"
],
"rules": {
"comma-dangle": [
"error",
"always-multiline"
],
"eol-last": ["error", "always"],
"indent": ["error", 2],
"jest/no-conditional-expect": 0,
"no-console": 2,
"no-trailing-spaces": 2,
"max-len": ["error", {
"code": 80,
"comments": 80,
"ignorePattern": "^import\\s.+\\sfrom\\s.+$",
"ignoreStrings": true,
"ignoreTemplateLiterals": true
}],
"multiline-comment-style": ["error", "separate-lines"],
"no-multiple-empty-lines": "error",
"no-multi-spaces": ["error", { "exceptions": { "Property": false } }],
"no-return-await": 2,
"arrow-body-style": ["error", "as-needed"],
"import/no-amd": 2,
"import/no-commonjs": 2,
"import/no-default-export": 2,
"import/no-namespace": 2,
"import/no-nodejs-modules": 0,
"keyword-spacing": ["error", { "overrides": {} }],
"react/prefer-stateless-function": 2,
"react/prop-types": 0,
"react/jsx-wrap-multilines": ["error", {
"declaration": "parens-new-line",
"assignment": "parens-new-line",
"return": "parens-new-line",
"arrow": "parens-new-line",
"condition": "parens-new-line",
"logical": "parens-new-line",
"prop": "parens-new-line"
}
],
"semi": ["error", "never"],
"sort-keys": 2,
"space-before-blocks": 2,
"@typescript-eslint/explicit-function-return-type": 0,
"@typescript-eslint/explicit-module-boundary-types": 0,
"@typescript-eslint/member-delimiter-style": ["error", {
"multiline": {
"delimiter": "none",
"requireLast": false
},
"singleline": {
"delimiter": "comma",
"requireLast": false
}
}],
"@typescript-eslint/no-explicit-any": 0,
"@typescript-eslint/no-unused-vars": [
2,
{
"argsIgnorePattern": "^_"
}
],
"@typescript-eslint/no-var-requires": 0,
"prefer-arrow/prefer-arrow-functions": [
"error",
{
"disallowPrototype": true,
"singleReturnOnly": false,
"classPropertiesAllowed": false
}
],
"prefer-destructuring": ["error", {"object": true, "array": true}],
"quotes": ["error", "single"],
"quote-props": ["error", "as-needed"],
"jsx-quotes": ["error", "prefer-single"]
},
"overrides": [
{
"files": [
"cypress/**/*"
],
"plugins": [
"cypress"
],
"env": {
"cypress/globals": true
},
"rules": {
"import/no-default-export": 0,
"jest/expect-expect": 0
}
},
{
"files": [
"examples/**/*"
],
"rules": {
"react/react-in-jsx-scope": 0
}
},
{
"files": [
"examples/**/pages/**/*"
],
"rules": {
"import/no-default-export": 0
}
},
{
"files": [
"**/*.config.js"
],
"rules": {
"import/no-commonjs": 0,
"no-undef": 0
}
}
],
"settings": {
"react": {
"pragma": "React",
"version": "16.13.1"
}
}
}
9 changes: 8 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,14 @@ out

# Testing
coverage/
.e2e
/coverage
/cypress/videos
/cypress/screenshots
/cypress/plugins
/cypress/support
/cypress/fixtures/example.json
cypress.json
!/cypress/cypress.json

# npm
package-lock.json
9 changes: 6 additions & 3 deletions .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,20 +20,23 @@ out
runtime.log

# Testing
__tests__
cypress
cypress.json
coverage
jest.*
.e2e
*.test.*

# Build tools
tsconfig.json
.eslintrc.json
babel.config.json

# Misc
.circleci
.all-contributorsrc
greenkeeper.json
jest-puppeteer.config.js
.github
Procfile
*.md
scripts
scripts
1 change: 0 additions & 1 deletion Procfile

This file was deleted.

Loading

0 comments on commit 7c12340

Please sign in to comment.