diff --git a/.all-contributorsrc b/.all-contributorsrc deleted file mode 100644 index 815edef2a..000000000 --- a/.all-contributorsrc +++ /dev/null @@ -1,343 +0,0 @@ -{ - "projectName": "transloco", - "projectOwner": "ngneat", - "repoType": "github", - "repoHost": "https://github.com", - "commitConvention": "angular", - "imageSize": "100", - "files": [ - "README.md" - ], - "commit": true, - "contributors": [ - { - "login": "irustm", - "name": "Rustam", - "avatar_url": "https://avatars1.githubusercontent.com/u/16316579?v=4", - "profile": "https://twitter.com/irustm", - "contributions": [ - "doc" - ] - }, - { - "login": "Coly010", - "name": "Colum Ferry", - "avatar_url": "https://avatars2.githubusercontent.com/u/12140467?v=4", - "profile": "https://github.com/Coly010", - "contributions": [ - "code", - "doc", - "ideas", - "test", - "blog" - ] - }, - { - "login": "armanozak", - "name": "Levent Arman Özak", - "avatar_url": "https://avatars3.githubusercontent.com/u/15855540?v=4", - "profile": "https://www.armanozak.com/", - "contributions": [ - "code" - ] - }, - { - "login": "theblushingcrow", - "name": "Inbal Sinai", - "avatar_url": "https://avatars3.githubusercontent.com/u/638818?v=4", - "profile": "https://github.com/theblushingcrow", - "contributions": [ - "doc" - ] - }, - { - "login": "larscom", - "name": "Lars Kniep", - "avatar_url": "https://avatars1.githubusercontent.com/u/1215195?v=4", - "profile": "http://www.larskniep.nl", - "contributions": [ - "code", - "ideas" - ] - }, - { - "login": "fxck", - "name": "Aleš", - "avatar_url": "https://avatars1.githubusercontent.com/u/1303561?v=4", - "profile": "https://github.com/fxck", - "contributions": [ - "code", - "ideas" - ] - }, - { - "login": "Edouardbozon", - "name": "Koala", - "avatar_url": "https://avatars0.githubusercontent.com/u/8522558?v=4", - "profile": "https://www.codamit.dev", - "contributions": [ - "doc", - "code" - ] - }, - { - "login": "DerSizeS", - "name": "Oleg Teterin", - "avatar_url": "https://avatars3.githubusercontent.com/u/708090?v=4", - "profile": "https://github.com/DerSizeS", - "contributions": [ - "code" - ] - }, - { - "login": "maxime1992", - "name": "Maxime", - "avatar_url": "https://avatars0.githubusercontent.com/u/4950209?v=4", - "profile": "https://twitter.com/maxime1992", - "contributions": [ - "doc" - ] - }, - { - "login": "zufarzhan", - "name": "Zufar Ismanov", - "avatar_url": "https://avatars3.githubusercontent.com/u/22148960?v=4", - "profile": "https://github.com/zufarzhan", - "contributions": [ - "code", - "ideas" - ] - }, - { - "login": "sk222sw", - "name": "Sonny Kjellberg", - "avatar_url": "https://avatars0.githubusercontent.com/u/8642363?v=4", - "profile": "https://github.com/sk222sw", - "contributions": [ - "doc" - ] - }, - { - "login": "ThierryDD", - "name": "Thierry", - "avatar_url": "https://avatars3.githubusercontent.com/u/184425?v=4", - "profile": "https://github.com/ThierryDD", - "contributions": [ - "doc" - ] - }, - { - "login": "AlexAegis", - "name": "Győri Sándor", - "avatar_url": "https://avatars3.githubusercontent.com/u/16900547?v=4", - "profile": "https://alexaegis.github.io/loreplotter/", - "contributions": [ - "doc" - ] - }, - { - "login": "maartentibau", - "name": "Maarten Tibau", - "avatar_url": "https://avatars1.githubusercontent.com/u/4103756?v=4", - "profile": "https://www.webtrix.be", - "contributions": [ - "doc" - ] - }, - { - "login": "MatthiasKunnen", - "name": "Matthias Kunnen", - "avatar_url": "https://avatars3.githubusercontent.com/u/16807587?v=4", - "profile": "https://github.com/MatthiasKunnen", - "contributions": [ - "code" - ] - }, - { - "login": "adgoncal", - "name": "Allan G", - "avatar_url": "https://avatars1.githubusercontent.com/u/10856791?v=4", - "profile": "https://github.com/adgoncal", - "contributions": [ - "doc" - ] - }, - { - "login": "SansDK", - "name": "SansDK", - "avatar_url": "https://avatars1.githubusercontent.com/u/25609266?v=4", - "profile": "https://github.com/SansDK", - "contributions": [ - "code" - ] - }, - { - "login": "mohamedaarab1994", - "name": "Mohamed Aarab", - "avatar_url": "https://avatars2.githubusercontent.com/u/36154561?v=4", - "profile": "https://github.com/mohamedaarab1994", - "contributions": [ - "code", - "test" - ] - }, - { - "login": "wesleygrimes", - "name": "Wes Grimes", - "avatar_url": "https://avatars0.githubusercontent.com/u/324308?v=4", - "profile": "https://wesleygrimes.com", - "contributions": [ - "code", - "test" - ] - }, - { - "login": "Dorrro", - "name": "Dorian Sobacki", - "avatar_url": "https://avatars1.githubusercontent.com/u/1622671?v=4", - "profile": "https://github.com/Dorrro", - "contributions": [ - "plugin" - ] - }, - { - "login": "denistrofimov", - "name": "Denis Trofimov", - "avatar_url": "https://avatars3.githubusercontent.com/u/2663876?v=4", - "profile": "http://denistrofimov.com", - "contributions": [ - "code" - ] - }, - { - "login": "tanepiper", - "name": "Tane Piper", - "avatar_url": "https://avatars3.githubusercontent.com/u/376930?v=4", - "profile": "https://tane.dev", - "contributions": [ - "code" - ] - }, - { - "login": "StillUpgrade", - "name": "StillUpgrade", - "avatar_url": "https://avatars0.githubusercontent.com/u/10169092?v=4", - "profile": "https://github.com/StillUpgrade", - "contributions": [ - "code" - ] - }, - { - "login": "coderunner", - "name": "Felix Trepanier", - "avatar_url": "https://avatars0.githubusercontent.com/u/408380?v=4", - "profile": "https://github.com/coderunner", - "contributions": [ - "code" - ] - }, - { - "login": "literalpie", - "name": "Benjamin Kindle", - "avatar_url": "https://avatars1.githubusercontent.com/u/20398475?v=4", - "profile": "http://literalpie.com", - "contributions": [ - "code" - ] - }, - { - "login": "karmasakshi", - "name": "Karmasakshi Goyal", - "avatar_url": "https://avatars3.githubusercontent.com/u/4698762?v=4", - "profile": "https://github.com/karmasakshi", - "contributions": [ - "tool" - ] - }, - { - "login": "Siedlerchr", - "name": "Christoph", - "avatar_url": "https://avatars1.githubusercontent.com/u/320228?v=4", - "profile": "https://github.com/Siedlerchr", - "contributions": [ - "code" - ] - }, - { - "login": "Waterstraal", - "name": "Mike Markus", - "avatar_url": "https://avatars0.githubusercontent.com/u/2691730?v=4", - "profile": "https://github.com/Waterstraal", - "contributions": [ - "code", - "doc", - "test" - ] - }, - { - "login": "minutuslausus", - "name": "Gergő Nagy", - "avatar_url": "https://avatars1.githubusercontent.com/u/7690112?v=4", - "profile": "https://github.com/minutuslausus", - "contributions": [ - "doc" - ] - }, - { - "login": "gamtiq", - "name": "Denis Sikuler", - "avatar_url": "https://avatars3.githubusercontent.com/u/1177323?v=4", - "profile": "https://github.com/gamtiq", - "contributions": [ - "doc" - ] - }, - { - "login": "steflen", - "name": "steflen", - "avatar_url": "https://avatars0.githubusercontent.com/u/18015545?v=4", - "profile": "https://github.com/steflen", - "contributions": [ - "doc" - ] - }, - { - "login": "StanevichIvan", - "name": "Ivan Stanevich", - "avatar_url": "https://avatars1.githubusercontent.com/u/20155344?v=4", - "profile": "https://github.com/StanevichIvan", - "contributions": [ - "doc" - ] - }, - { - "login": "chrsi", - "name": "Christian Siber", - "avatar_url": "https://avatars2.githubusercontent.com/u/1976206?v=4", - "profile": "https://github.com/chrsi", - "contributions": [ - "test" - ] - }, - { - "login": "zhongsp", - "name": "Patrick Zhong", - "avatar_url": "https://avatars.githubusercontent.com/u/1198615?v=4", - "profile": "http://www.linkedin.com/in/patrickzhong", - "contributions": [ - "code", - "test" - ] - }, - { - "login": "leoleoff", - "name": "leoleoff", - "avatar_url": "https://avatars.githubusercontent.com/u/78927584?v=4", - "profile": "https://github.com/leoleoff", - "contributions": [ - "doc" - ] - } - ], - "contributorsPerLine": 7 -} diff --git a/.cursor/mcp.json b/.cursor/mcp.json new file mode 100644 index 000000000..3ae680815 --- /dev/null +++ b/.cursor/mcp.json @@ -0,0 +1,7 @@ +{ + "mcpServers": { + "nx-mcp": { + "url": "http://localhost:9502/sse" + } + } +} diff --git a/.cursor/rules/nx-rules.mdc b/.cursor/rules/nx-rules.mdc new file mode 100644 index 000000000..65fa0a4f1 --- /dev/null +++ b/.cursor/rules/nx-rules.mdc @@ -0,0 +1,34 @@ +--- +description: +globs: +alwaysApply: true +--- + +// This file is automatically generated by Nx Console + +You are in an nx workspace using Nx 19.8.9 and npm as the package manager. + +You have access to the Nx MCP server and the tools it provides. Use them. Follow these guidelines in order to best help the user: + +# General Guidelines +- When answering questions, use the nx_workspace tool first to gain an understanding of the workspace architecture +- For questions around nx configuration, best practices or if you're unsure, use the nx_docs tool to get relevant, up-to-date docs!! Always use this instead of assuming things about nx configuration +- If the user needs help with an Nx configuration or project graph error, use the 'nx_workspace' tool to get any errors +- To help answer questions about the workspace structure or simply help with demonstrating how tasks depend on each other, use the 'nx_visualize_graph' tool + +# Generation Guidelines +If the user wants to generate something, use the following flow: + +- learn about the nx workspace and any specifics the user needs by using the 'nx_workspace' tool and the 'nx_project_details' tool if applicable +- get the available generators using the 'nx_generators' tool +- decide which generator to use. If no generators seem relevant, check the 'nx_available_plugins' tool to see if the user could install a plugin to help them +- get generator details using the 'nx_generator_schema' tool +- you may use the 'nx_docs' tool to learn more about a specific generator or technology if you're unsure +- decide which options to provide in order to best complete the user's request. Don't make any assumptions and keep the options minimalistic +- open the generator UI using the 'nx_open_generate_ui' tool +- wait for the user to finish the generator +- read the generator log file using the 'nx_read_generator_log' tool +- use the information provided in the log file to answer the user's question or continue with what they were doing + + + diff --git a/.eslintignore b/.eslintignore new file mode 100644 index 000000000..3c3629e64 --- /dev/null +++ b/.eslintignore @@ -0,0 +1 @@ +node_modules diff --git a/.eslintrc.json b/.eslintrc.json new file mode 100644 index 000000000..65f3986b0 --- /dev/null +++ b/.eslintrc.json @@ -0,0 +1,74 @@ +{ + "root": true, + "ignorePatterns": ["**/*"], + "plugins": ["@nx"], + "settings": { + "import/resolver": { + "typescript": { + "project": ["libs/*/tsconfig.json", "tsconfig.base.json"] + } + } + }, + "overrides": [ + { + "files": ["*.ts", "*.tsx", "*.js", "*.jsx"], + "rules": { + "@nx/enforce-module-boundaries": [ + "error", + { + "enforceBuildableLibDependency": true, + "allow": [], + "depConstraints": [ + { + "sourceTag": "*", + "onlyDependOnLibsWithTags": ["*"] + } + ] + } + ] + } + }, + { + "files": ["*.ts", "*.tsx"], + "extends": [ + "plugin:@nx/typescript", + "plugin:import/recommended", + "plugin:import/typescript" + ], + "rules": { + "import/order": [ + "error", + { + "groups": ["builtin", "external", "internal", "parent", "sibling"], + "newlines-between": "always" + } + ], + "@typescript-eslint/no-extra-semi": "error", + "no-extra-semi": "off" + } + }, + { + "files": ["*.js", "*.jsx"], + "extends": ["plugin:@nx/javascript"], + "rules": { + "@typescript-eslint/no-extra-semi": "error", + "no-extra-semi": "off" + } + }, + { + "files": ["**/*.spec.ts", "**/mocks.ts", "**/test-setup.ts"], + "rules": { + "@typescript-eslint/no-explicit-any": "off", + "@angular-eslint/component-class-suffix": "off", + "@typescript-eslint/no-empty-function": "off", + "@typescript-eslint/no-non-null-assertion": "off" + } + }, + { + "files": ["**/types.ts", "**/helpers.ts"], + "rules": { + "@typescript-eslint/no-explicit-any": "off" + } + } + ] +} diff --git a/.github/ISSUE_TEMPLATE/bug-report.yaml b/.github/ISSUE_TEMPLATE/bug-report.yaml new file mode 100644 index 000000000..fac82251c --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug-report.yaml @@ -0,0 +1,111 @@ +name: Bug Report +description: Report a bug in one of the Transloco packages +title: 'Bug(scope):' + +body: + - type: checkboxes + attributes: + label: Is there an existing issue for this? + description: Please search to see if an issue already exists for the bug you encountered. + options: + - label: I have searched the existing issues + required: true + + - type: dropdown + id: affected-packages + attributes: + label: Which Transloco package(s) are the source of the bug? + options: + - Transloco + - Schematics + - Locale + - MessageFormat + - Optimize + - Persist Lang + - Persist Translations + - Preload Langs + - Scoped Libs + - Validator + - Don't know / other + multiple: true + validations: + required: true + + - type: dropdown + id: is-regression + attributes: + label: Is this a regression? + options: + - 'Yes' + - 'No' + validations: + required: true + + - type: textarea + id: current-behavior + attributes: + label: Current behavior + validations: + required: true + + - type: textarea + id: expected-behavior + attributes: + label: Expected behavior + validations: + required: true + + - type: input + id: reproduction + attributes: + label: Please provide a link to a minimal reproduction of the bug, if you won't provide a link the issue won't be handled. + description: 'You can fork this CodeSandbox playground: https://codesandbox.io/p/sandbox/jsverse-transloco-kn52hs' + validations: + required: true + + - type: textarea + id: transloco-config + attributes: + label: Transloco Config + render: markdown + placeholder: Provide the Transloco configuration if relevant to the issue + + - type: textarea + id: environment + attributes: + label: Please provide the environment you discovered this bug in + render: markdown + value: | + Transloco: + Angular: + Node: + Package Manager: + OS: + + - type: textarea + id: browser + attributes: + label: Browser + render: markdown + placeholder: | + Chrome (desktop/Android/iOS) version XX + Firefox version XX + Safari (desktop/iOS) version XX + IE version XX + Edge version XX + + - type: textarea + id: other + attributes: + label: Additional context + description: Links? References? Anything that will give us more context about the issue you are encountering! + + - type: dropdown + id: contribution + attributes: + label: I would like to make a pull request for this bug + options: + - 'Yes 🚀' + - 'No' + validations: + required: true diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md deleted file mode 100644 index 9f65d05de..000000000 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ /dev/null @@ -1,54 +0,0 @@ ---- -name: Bug report -about: Report a bug -title: 'Bug:' -labels: '' -assignees: '' - ---- - -### Current behavior -A clear and concise description of what the bug is. - -### Expected behavior -A clear and concise description of what you expected to happen. - -### Minimal reproduction of the problem with instructions - -Provide the _STEPS TO REPRODUCE_ and if possible a _MINIMAL DEMO_ of the problem, for that you could use our [stackblitz example](https://stackblitz.com/edit/transloco-example) - -### Screenshots -If applicable, add screenshots to help explain your problem. - -### Transloco config - - -### Environment -
- Transloco version: X.Y.Z
-- Angular version: X.Y.Z
-
- - -For Tooling issues: -

-- Node version: XX  
-- Platform:  
-
- -### Browser: -- [ ] Chrome (desktop) version XX -- [ ] Chrome (Android) version XX -- [ ] Chrome (iOS) version XX -- [ ] Firefox version XX -- [ ] Safari (desktop) version XX -- [ ] Safari (iOS) version XX -- [ ] IE version XX -- [ ] Edge version XX - -### Additional context -Add any other context about the problem here. - -### Contribution -I would like to make a pull request for this feature: -[ ] Yes! 🚀 -[ ] Maybe next time diff --git a/.github/ISSUE_TEMPLATE/feature-request.yaml b/.github/ISSUE_TEMPLATE/feature-request.yaml new file mode 100644 index 000000000..a12f1531c --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature-request.yaml @@ -0,0 +1,70 @@ +name: Feature request +description: Suggest an idea for this project +title: 'Feature(scope):' + +body: + - type: checkboxes + attributes: + label: Is there an existing issue for this? + description: Please search to see if an issue already exists for the bug you encountered. + options: + - label: I have searched the existing issues + required: true + + - type: dropdown + id: affected-packages + attributes: + label: Which Transloco package(s) will this feature affect? + options: + - Transloco + - Schematics + - Locale + - MessageFormat + - Optimize + - Persist Lang + - Persist Translations + - Preload Langs + - Scoped Libs + - Validator + - Don't know / other + multiple: true + validations: + required: true + + - type: textarea + id: feature-behavior + attributes: + label: Is your feature request related to a problem? Please describe + description: A clear and concise description of what the problem is. + placeholder: Ex. I'm always frustrated when [...] + + - type: textarea + id: solution + attributes: + label: Describe the solution you'd like + placeholder: A clear and concise description of what you want to happen. + + - type: textarea + id: solution-alternatives + attributes: + label: Describe alternatives you've considered + render: markdown + placeholder: A clear and concise description of the current behavior. It's best to provide an example, for that you could use our [CodeSandbox example](https://codesandbox.io/p/sandbox/jsverse-transloco-kn52hs) + validations: + required: true + + - type: textarea + id: other + attributes: + label: Additional context + description: Links? References? Anything that will give us more context about the issue you are encountering! + + - type: dropdown + id: contribution + attributes: + label: I would like to make a pull request for this feature + options: + - 'Yes 🚀' + - 'No' + validations: + required: true diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md deleted file mode 100644 index 245c89df8..000000000 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ /dev/null @@ -1,31 +0,0 @@ ---- -name: Feature request -about: Suggest an idea for this project -title: Feature -labels: '' -assignees: '' - ---- - -### Is your feature request related to a problem? Please describe. -A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] - -### Describe the solution you'd like -A clear and concise description of what you want to happen. - -### Describe alternatives you've considered -A clear and concise description of any alternative solutions or features you've considered. - -### Current behavior -A clear and concise description of the current behavior. It's best to provide an example, for that you could use our [stackblitz example](https://stackblitz.com/edit/transloco-example) - -### Expected behavior -A clear and concise description of the expected behavior. It's best to provide an example. - -### Additional context -Add any other context or screenshots about the feature request here. - -### Contribution -I want to make a pull request for this feature: -[ ] Yes! 🚀 -[ ] Maybe next time diff --git a/.github/actions/step-setup/action.yml b/.github/actions/step-setup/action.yml new file mode 100644 index 000000000..c555a538b --- /dev/null +++ b/.github/actions/step-setup/action.yml @@ -0,0 +1,14 @@ +name: 'Setup Node and install dependencies' +description: 'Setup Node and install dependencies' + +runs: + using: composite + steps: + - uses: actions/setup-node@v4 + with: + node-version: 20 + cache: npm + + - name: Install dependencies + run: npm i + shell: bash diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 000000000..033bfd07b --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1,44 @@ + + +## PR Checklist + +Please check if your PR fulfills the following requirements: + +- [ ] The commit message follows our guidelines: https://github.com/jsverse/transloco/blob/master/CONTRIBUTING.md#commit +- [ ] Tests for the changes have been added (for bug fixes / features) +- [ ] Docs have been added / updated (for bug fixes / features) + +## PR Type + +What kind of change does this PR introduce? + + + +- [ ] Bugfix +- [ ] Feature +- [ ] Code style update (formatting, local variables) +- [ ] Refactoring (no functional changes, no api changes) +- [ ] Build related changes +- [ ] CI related changes +- [ ] Documentation content changes +- [ ] Other... Please describe: + +## What is the current behavior? + + + +Issue Number: N/A + +## What is the new behavior? + +## Does this PR introduce a breaking change? + +- [ ] Yes +- [ ] No + + + +## Other information diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 000000000..3d3b7fb5e --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,45 @@ +name: CI + +on: + pull_request: + push: + branches: + - master + +jobs: + ci-step: + strategy: + fail-fast: false + matrix: + target: ['ci:build', 'ci:test', 'ci:lint', 'ci:e2e'] + runs-on: ubuntu-latest + name: ${{ matrix.target }} + steps: + - uses: actions/checkout@v4 + + - name: Setup + uses: ./.github/actions/step-setup + + - name: Run ${{ matrix.target }} + run: npm run ${{ matrix.target }} + shell: bash + + - name: Publish any commit / build for testing + if: ${{ matrix.target == 'ci:build' && github.ref != 'refs/heads/master' }} + run: npm run release:pkg-pr-new + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + commitlint: + runs-on: ubuntu-latest + if: github.event_name == 'pull_request' + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Setup + uses: ./.github/actions/step-setup + + - name: Validate PR commits with commitlint + run: npx commitlint --from ${{ github.event.pull_request.head.sha }}~${{ github.event.pull_request.commits }} --to ${{ github.event.pull_request.head.sha }} --verbose diff --git a/.github/workflows/deploy-demo-app.yml b/.github/workflows/deploy-demo-app.yml new file mode 100644 index 000000000..f13ae1718 --- /dev/null +++ b/.github/workflows/deploy-demo-app.yml @@ -0,0 +1,52 @@ +# Simple workflow for deploying static content to GitHub Pages +name: Deploy playground to Pages + +on: + # Runs on pushes targeting the default branch + push: + branches: ["master"] + + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages +permissions: + contents: read + pages: write + id-token: write + +# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. +# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. +concurrency: + group: "pages" + cancel-in-progress: false + +jobs: + # Single deploy job since we're just deploying + deploy: + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup + uses: ./.github/actions/step-setup + + - name: Setup Pages + uses: actions/configure-pages@v5 + + - name: Build playground + run: ORIGIN='https://jsverse.github.io/transloco/' npm run build:playground + + - name: Upload artifact + uses: actions/upload-pages-artifact@v3 + with: + # Upload entire repository + path: 'dist/apps/transloco-playground' + + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4 diff --git a/.github/workflows/reviewdog.yml b/.github/workflows/reviewdog.yml new file mode 100644 index 000000000..12eb996a0 --- /dev/null +++ b/.github/workflows/reviewdog.yml @@ -0,0 +1,16 @@ +name: reviewdog + +on: + pull_request: + paths: + - '.github/**/*.yml' + +jobs: + actionlint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - uses: reviewdog/action-actionlint@v1 + with: + fail_on_error: true diff --git a/.github/workflows/stale-issues.yml b/.github/workflows/stale-issues.yml new file mode 100644 index 000000000..81a580816 --- /dev/null +++ b/.github/workflows/stale-issues.yml @@ -0,0 +1,15 @@ +name: Mark stale issues +on: + schedule: + - cron: '30 1 * * *' # Runs daily at 01:30 UTC +jobs: + stale: + runs-on: ubuntu-latest + steps: + - uses: actions/stale@v9 + with: + stale-issue-message: 'This issue is missing information/reproduction for 3 weeks with no activity. Please provide the required information/reproduction or this issue will be closed in 7 days.' + days-before-stale: 21 + only-labels: 'Missing reproduction,Missing information' + days-before-pr-stale: -1 # Exclude PRs + days-before-pr-close: -1 # Exclude PRs diff --git a/.gitignore b/.gitignore index 1347d08c5..2af43b2f7 100644 --- a/.gitignore +++ b/.gitignore @@ -4,15 +4,9 @@ /dist /tmp /out-tsc -# Only exists if Bazel was run -/bazel-out # dependencies -/node_modules node_modules -# profiling files -chrome-profiler-events.json -speed-measure-plugin.json # IDEs and editors /.idea @@ -22,18 +16,24 @@ speed-measure-plugin.json *.launch .settings/ *.sublime-workspace +.idx/ + +# IDE - Cursor +.cursor/* +!.cursor/mcp.json +!.cursor/rules + # IDE - VSCode -.vscode/* +.vscode !.vscode/settings.json !.vscode/tasks.json !.vscode/launch.json !.vscode/extensions.json -.history/* # misc +/.angular/cache /.sass-cache -/schematics/.cache /connect.lock /coverage /libpeerconnection.log @@ -45,7 +45,12 @@ testem.log # System Files .DS_Store Thumbs.db -cypress/screenshots -dist-i18n -docs/build -docs/.docusaurus \ No newline at end of file + +# Cypress +apps/transloco-playground-e2e/cypress/screenshots/* + +.nx/cache +.nx/workspace-data + +.nx +local-dev diff --git a/.husky/commit-msg b/.husky/commit-msg new file mode 100755 index 000000000..fd2bf708e --- /dev/null +++ b/.husky/commit-msg @@ -0,0 +1 @@ +npx --no-install commitlint --edit $1 diff --git a/.husky/pre-commit b/.husky/pre-commit new file mode 100755 index 000000000..87ea02a11 --- /dev/null +++ b/.husky/pre-commit @@ -0,0 +1 @@ +npm run pre-commit diff --git a/.lintstagedrc b/.lintstagedrc new file mode 100644 index 000000000..04d959be7 --- /dev/null +++ b/.lintstagedrc @@ -0,0 +1,4 @@ +{ + "*.{ts,js}": ["eslint --fix"], + "*.{js,json,css,scss,less,md,ts,html,component.html}": ["prettier --write"] +} diff --git a/.prettierignore b/.prettierignore index 537acfae6..0ff9d13ae 100644 --- a/.prettierignore +++ b/.prettierignore @@ -1,2 +1,12 @@ -package.json -dist \ No newline at end of file +# Add files here to ignore them from prettier formatting + +node_modules +/dist +/coverage +/.nx +/tmp +/.angular + +/docs/build +/docs/.docusaurus +/docs/static/transloco-playground diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 000000000..544138be4 --- /dev/null +++ b/.prettierrc @@ -0,0 +1,3 @@ +{ + "singleQuote": true +} diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index eda455985..000000000 --- a/.travis.yml +++ /dev/null @@ -1,11 +0,0 @@ -language: node_js -cache: - directories: - - ~/.npm -notifications: - email: true -node_js: - - '10' -branches: - except: - - /^v\d+\.\d+\.\d+$/ diff --git a/.verdaccio/config.yml b/.verdaccio/config.yml new file mode 100644 index 000000000..f74420f2b --- /dev/null +++ b/.verdaccio/config.yml @@ -0,0 +1,28 @@ +# path to a directory with all packages +storage: ../tmp/local-registry/storage + +# a list of other known repositories we can talk to +uplinks: + npmjs: + url: https://registry.npmjs.org/ + maxage: 60m + +packages: + '**': + # give all users (including non-authenticated users) full access + # because it is a local registry + access: $all + publish: $all + unpublish: $all + + # if package is not available locally, proxy requests to npm registry + proxy: npmjs + +# log settings +log: + type: stdout + format: pretty + level: warn + +publish: + allow_offline: true # set offline to true to allow publish offline diff --git a/@types/angular-globals/index.d.ts b/@types/angular-globals/index.d.ts new file mode 100644 index 000000000..3e884028a --- /dev/null +++ b/@types/angular-globals/index.d.ts @@ -0,0 +1,10 @@ +/** + * Global Angular-specific TypeScript declarations + * These declarations are only used during testing + */ + +/** + * ngDevMode is used by Angular for tokens in dependency injection. + * This declaration makes it available globally for type checking. + */ +declare const ngDevMode: boolean; diff --git a/BREAKING_CHANGES.md b/BREAKING_CHANGES.md index 20aceb2df..4efb41fe8 100644 --- a/BREAKING_CHANGES.md +++ b/BREAKING_CHANGES.md @@ -1,3 +1,239 @@ +# Transloco v8 + +## Transloco + +### Removed Utility Functions from Public API + +**Commit**: `aae425b6` - "chore(transloco): 🤖 move to @jsverse/utils" + +Many utility functions have been removed from `@jsverse/transloco`. some were moved to `@jsverse/utils` and some were internal only: + +#### Moved to `@jsverse/utils` + +- `isFunction()`, `isString()`, `isNumber()`, `isObject()`, `isNil()`, `isDefined()` +- `size()`, `isEmpty()` - Collection utilities +- `coerceArray()`, `toCamelCase()`, `toNumber()` - Conversion utilities + +#### Internal Utilities - Removed from public API + +- `shouldListenToLangChanges()`, `listenOrNotOperator()`, `resolveInlineLoader()` +- `getEventPayload()`, `isScopeObject()`, `hasInlineLoader()` +- `getPipeValue()`, `getLangFromScope()`, `getScopeFromLang()` +- `flatten()`, `unflatten()` + +### Angular Schematics Updates + +**Commit**: `6cd2f3e2` - "refactor(transloco): 💡 Remove all the schematics but init" + +Removed schematics from `@jsverse/transloco`: + +- `component` (alias: `c`) - Component generation +- `migrate` (alias: `m`) - Migration utilities +- `scope` (alias: `s`) - Scope generation +- `upgrade` (alias: `up`) - Upgrade utilities +- `keys-manager` (alias: `km`) - Keys manager +- `join` (alias: `build`) - Join translation files +- `split` (alias: `sp`) - Split translation files +- `ng-migrate` - Angular i18n migration + +Only `ng-add` remains in the main package. + +**Migration**: Install `@jsverse/transloco-schematics` for the moved schematics: + +```bash +npm install @jsverse/transloco-schematics --save-dev +ng generate @jsverse/transloco-schematics:scope my-scope +``` + +## Transloco Locale + +### Service Initialization Changes + +**Commit**: `73d21aa0` - "feat(locale): improve locale detection logic in locale service (#862)" +**File**: `libs/transloco-locale/src/lib/transloco-locale.service.ts` + +The `TranslocoLocaleService` constructor now includes initialization logic that changes locale detection: + +- Service now proactively detects locale in this order: + 1. Browser locale (via `getBrowserCultureLang()`) + 2. Active language from TranslocoService + 3. Default locale +- Locale is set during service construction rather than lazily + +**Migration**: If you were setting locale immediately after service injection, review your initialization logic. + +# Transloco v7 + +Packages were moved to the jsverse scope, the versioning continues from the last version of the previous scope. + +## Transloco + +- The package is now published under the `@jsverse` scope. +- The transpiler matching algorithm has changed, see this [key referencing discussion](https://github.com/jsverse/transloco/discussions/737). +- The transpiler `transpile` method signature has changed to an object. +- `setTranslationKey` method signature has changed, the `lang` parameter was moved to the config. + +## Transloco Messageformat + +- The package is now published under the `@jsverse` scope and aligned to the main package major version (v7). +- Updated the transpile method usages. +- Minimum Transloco version is now `^7.0.0`. + +## Transloco Locale + +- The package is now published under the `@jsverse` scope and aligned to the main package major version (v7). + +## Transloco Optimize + +- The package is now published under the `@jsverse` scope and aligned to the main package major version (v7). + +## Transloco Persist Lang + +- The package is now published under the `@jsverse` scope and aligned to the main package major version (v7). + +## Transloco Persist Translations + +- The package is now published under the `@jsverse` scope and aligned to the main package major version (v7). + +## Transloco Preload Langs + +- The package is now published under the `@jsverse` scope and aligned to the main package major version (v7). + +## Transloco Utils + +- The package is now published under the `@jsverse` scope and aligned to the main package major version (v7). + +## Transloco Scoped Libs + +- The package is now published under the `@jsverse` scope and aligned to the main package major version (v7). + +## Transloco Scoped Validator + +- The package is now published under the `@jsverse` scope and aligned to the main package major version (v7). + +# Transloco V5.0.8-10 & V6 + +Versions 5.0.8-10 also contains the breaking change in V6 but accidentally weren't marked correctly. + +## Transloco + +- Update `flat` package to v6 which is ESM + +# Transloco V5 + +V5 was focused on a major infra upgrade to improve Transloco's maintainability also moving to new Angular features. +please take a look at the following: + +## Transloco + +- `@angular/core` peer dependency is now `>=v16` +- `TRANSLOCO_SCOPE` is now always provided as multi. +- Remove `PersistStorage` type. +- Pipes, directives and components are now standalone. +- Removed `forRoot` from `TranslocoModule`, use `provideTransloco` and other provider functions. + +## Transloco Locale + +- `@angular/core` peer dependency is now `>=v16` +- Pipes, directives and components are now standalone. +- Injection tokens are now prefixed with `TRANSLOCO_` +- Removed `forRoot` from `TranslocoLocaleModule`, use `provideTranslocoLocale` and other provider functions. + +## Transloco Messageformat + +- `@angular/core` peer dependency is now `>=v16` +- Removed `TranslocoMessageFormatModule`, use `provideTranslocoMessageformat`. + +## Transloco Persist Lang + +- `@angular/core` peer dependency is now `>=v16` +- Removed `TranslocoPersistLangModule`, use `provideTranslocoPersistLang`. + +## Transloco Persist Translations + +- `@angular/core` peer dependency is now `>=v16` +- Removed `TranslocoPersistTranslationsModule`, use `provideTranslocoPersistTranslations`. + +## Transloco Preload Langs + +- `@angular/core` peer dependency is now `>=v16` +- Removed `TranslocoPreloadLangsModule`, use `provideTranslocoPreloadLangs`. + +Other packages were bumped to keep alignment. + +# Transloco V4 + +Transloco now requires `@angular/core` v13 and above: + +## Transloco + +- `@angular/core` peer dependency is now `>=v13` + +## Transloco Locale + +- `@angular/core` peer dependency is now `>=v13` + +## Transloco Messageformat + +- `@angular/core` peer dependency is now `>=v13` + +## Transloco Persist Lang + +- `@angular/core` peer dependency is now `>=v13` + +## Transloco Persist Translations + +- `@angular/core` peer dependency is now `>=v13` + +## Transloco Preload Langs + +- `@angular/core` peer dependency is now `>=v13` + +Other packages were bumped to keep alignment. + +# Transloco V3 + +V3 was focused on a major infra upgrade to improve Transloco's maintainability and the ability to create new features easily. +We have removed deprecated code and upgraded dependencies, please take a look at the following: + +## Transloco + +- `@angular/core` peer dependency is now `>=v12` +- Removed `scopeMapping` property from the `TranslocoConfig`, define the alias on the scope provider instead. +- Removed `provideTranslocoConfig` function. +- LoadedEvent - removed `lang` property. +- `TranslocoTestingModule` removed `withLangs` method, use `forRoot` instead. + +## Transloco Locale + +- `@angular/core` peer dependency is now `>=v12` +- `TranslocoLocaleModule` removed `init` method, use `forRoot` instead. + +## Transloco Messageformat + +- `@angular/core` peer dependency is now `>=v12` +- Upgraded `messageformat` from v2.3.0 to `@messageformat/core` v3.0.0, see [changelog](https://github.com/messageformat/messageformat/blob/master/packages/core/CHANGELOG.md#300-2021-05-13) for more information. +- `TranslocoMessageFormatModule` removed `init` method, use `forRoot` instead. + +### Features + +- Messageformat compiled messages are now cached by default see [#358](https://github.com/jsverse/transloco/issues/358) & [messageformat caching](https://jsverse.gitbook.io/transloco/plugins/message-format#caching-v3). Thank goes to [k3nsei](https://github.com/k3nsei). + +## Transloco Persist Lang + +- `@angular/core` peer dependency is now `>=v12` +- `TranslocoPersistLangModule` removed `init` method, use `forRoot` instead. + +## Transloco Persist Translations + +- `@angular/core` peer dependency is now `>=v12` +- `TranslocoPersistTranslationsModule` removed `init` method, use `forRoot` instead. + +## Transloco Preload Langs + +- `@angular/core` peer dependency is now `>=v12` +- `TranslocoPreloadLangsModule` removed `preload` method, use `forRoot` instead. + # Transloco V2 - Structural directive is now a **memoized** function: @@ -53,12 +289,6 @@ We need this information to know whether we're dealing with a `language` or a `s **We created a schematics command that'll do most of the work for you** -``` -ng g @ngneat/transloco:upgrade -``` - -See [v2-upgrade.md](https://github.com/ngneat/transloco/tree/master/schematics/src/upgrade/v2-upgrade.md) for more information. - ## Features - Each translation file is now flatten in runtime. This change brings benefits such as lower memory consumption, and faster value accessor. diff --git a/CHANGELOG.md b/CHANGELOG.md index 7ad854cc8..09bcf2f93 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,682 +1,116 @@ -# Changelog +## 8.2.1 (2026-01-19) -All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. -## [2.22.0](https://github.com/ngneat/transloco/compare/v2.21.0...v2.22.0) (2021-07-01) +### 🩹 Fixes -### Features +- **transloco:** 🐛 Avoid toObservable on signal API + string key ([#895](https://github.com/jsverse/transloco/pull/895)) -- 🎸 expose currentLang in structural directive ([#380](https://github.com/ngneat/transloco/issues/380)) ([77b0567](https://github.com/ngneat/transloco/commit/77b0567)), closes [ngneat/transloco#376](https://github.com/ngneat/transloco/issues/376) -- 🎸 update schematics id to v12 ([86e896d](https://github.com/ngneat/transloco/commit/86e896d)) -- allow to specify options when setting translations by key ([#464](https://github.com/ngneat/transloco/issues/464)) ([e7d97e6](https://github.com/ngneat/transloco/commit/e7d97e6)) +### ❤️ Thank You -## [2.21.0](https://github.com/ngneat/transloco/compare/v2.20.1...v2.21.0) (2021-05-26) +- Andrew Steel -### Bug Fixes +## 8.2.0 (2025-11-15) -- 🐛 update angular peer dep ([6b96f12](https://github.com/ngneat/transloco/commit/6b96f12)) -- directly specify location of package.json missing i18n config ([#401](https://github.com/ngneat/transloco/issues/401)) ([54ee98a](https://github.com/ngneat/transloco/commit/54ee98a)) -### Features +### 🚀 Features -- **locale:** support default currency config ([#423](https://github.com/ngneat/transloco/issues/423)) ([463b170](https://github.com/ngneat/transloco/commit/463b170)) +- **transloco:** 🎸 Add config option for scope auto prefixing ([#868](https://github.com/jsverse/transloco/pull/868)) -### [2.20.1](https://github.com/ngneat/transloco/compare/v2.20.0...v2.20.1) (2021-02-28) +### ❤️ Thank You -### Bug Fixes +- Baptiste Moreau @FU856BMO -- language fallback strategy ([#390](https://github.com/ngneat/transloco/issues/390)) ([92a28b4](https://github.com/ngneat/transloco/commit/92a28b4)) +## 8.1.0 (2025-10-11) -## [2.20.0](https://github.com/ngneat/transloco/compare/v2.19.2...v2.20.0) (2020-12-17) -### Bug Fixes +### 🚀 Features -- 🐛 service not initialized in testing module ([#382](https://github.com/ngneat/transloco/issues/382)) ([08db253](https://github.com/ngneat/transloco/commit/08db253)) -- 🐛 update peer to support angular 11 ([6f3f973](https://github.com/ngneat/transloco/commit/6f3f973)), closes [#378](https://github.com/ngneat/transloco/issues/378) -- schematics join ([#348](https://github.com/ngneat/transloco/issues/348)) ([174f178](https://github.com/ngneat/transloco/commit/174f178)) +- **locale:** 🎸 add getDefaultLocale ([a468a2fc](https://github.com/jsverse/transloco/commit/a468a2fc)) +- **transloco:** 🎸 auto-detect public folder in ng-add ([#879](https://github.com/jsverse/transloco/pull/879)) -### Features +### 🩹 Fixes -- 🎸 transpile array values ([#383](https://github.com/ngneat/transloco/issues/383)) ([fc139e0](https://github.com/ngneat/transloco/commit/fc139e0)) +- **scoped-libs:** 🐛 gracefully handle missing file ([cd8bb789](https://github.com/jsverse/transloco/commit/cd8bb789)) +- **scoped-libs:** 🐛 add Windows path support for glob patterns ([d462998d](https://github.com/jsverse/transloco/commit/d462998d)) +- **transloco:** 🐛 expose TranslocoLoaderData ([7c5b19ad](https://github.com/jsverse/transloco/commit/7c5b19ad)) -### [2.19.3](https://github.com/ngneat/transloco/compare/v2.19.2...v2.19.3) (2020-12-06) +### ❤️ Thank You -### Bug Fixes +- Shahar Kazaz @shaharkazaz -- 🐛 update peer to support angular 11 ([6f3f973](https://github.com/ngneat/transloco/commit/6f3f973)), closes [#378](https://github.com/ngneat/transloco/issues/378) +## 8.0.2 (2025-09-26) -### [2.19.2](https://github.com/ngneat/transloco/compare/v2.19.1...v2.19.2) (2020-12-01) +### 🩹 Fixes -### Bug Fixes +- **transloco:** 🐛 expose TranslocoLoaderData ([7c5b19ad](https://github.com/jsverse/transloco/commit/7c5b19ad)) -- 🐛 schematics keys manager install, support yarn ([d923542](https://github.com/ngneat/transloco/commit/d923542)) -- **tests:** fix failing unit and e2e tests ([#361](https://github.com/ngneat/transloco/issues/361)) ([43ff362](https://github.com/ngneat/transloco/commit/43ff362)) +### ❤️ Thank You -### [2.19.1](https://github.com/ngneat/transloco/compare/v2.19.0...v2.19.1) (2020-08-22) +- Shahar Kazaz @shaharkazaz -### Bug Fixes +## 8.0.1 (2025-09-26) -- 🐛 pipe key type in strict mode ([faa58a5](https://github.com/ngneat/transloco/commit/faa58a5)), closes [#311](https://github.com/ngneat/transloco/issues/311) -- 🐛 select translation on lang change ([f2e5415](https://github.com/ngneat/transloco/commit/f2e5415)) +### 🩹 Fixes -### Tests +- **transloco:** 🐛 add utils and transloco-utils as dependencies ([#872](https://github.com/jsverse/transloco/pull/872)) -- 💍 update tests ([427c99f](https://github.com/ngneat/transloco/commit/427c99f)) +### ❤️ Thank You -## [2.19.0](https://github.com/ngneat/transloco/compare/v2.18.4...v2.19.0) (2020-08-18) +- Cédric Exbrayat @cexbrayat -### Features +# 8.0.0 (2025-09-14) -- 🎸 Add interpolation to configuration ([#330](https://github.com/ngneat/transloco/issues/330)) ([cf07bfc](https://github.com/ngneat/transloco/commit/cf07bfc)) +### 🚀 Features -### [2.18.4](https://github.com/ngneat/transloco/compare/v2.18.3...v2.18.4) (2020-08-07) +- **locale:** 🎸 improve locale detection logic in locale service ([73d21aa0](https://github.com/jsverse/transloco/commit/73d21aa0)) +- **schematics:** 🎸 Introduce new schematics-core library for shared utilities ([053a4fa8](https://github.com/jsverse/transloco/commit/053a4fa8)) -### Bug Fixes +### 🩹 Fixes -- 🐛 Put transloco.module in its own folder ([#319](https://github.com/ngneat/transloco/issues/319)) ([b54be7e](https://github.com/ngneat/transloco/commit/b54be7e)) +- **transloco:** 🐛 fix wrong import ([e65f9f28](https://github.com/jsverse/transloco/commit/e65f9f28)) -### [2.18.3](https://github.com/ngneat/transloco/compare/v2.18.2...v2.18.3) (2020-07-22) +### 🤖 Chore -### Bug Fixes +- **transloco:** 🤖 move to @jsverse/utils ([aae425b6](https://github.com/jsverse/transloco/commit/aae425b6)) +- **transloco:** 🤖 Add package optimizations ([0fad5d06](https://github.com/jsverse/transloco/commit/0fad5d06)) +- **locale:** 🤖 Add package optimizations ([2bc8485c](https://github.com/jsverse/transloco/commit/2bc8485c)) +- **messageformat:** 🤖 Add package optimizations ([24d82d4a](https://github.com/jsverse/transloco/commit/24d82d4a)) +- **persist-lang:** 🤖 update persist-lang to correct utils version ([e435e9b3](https://github.com/jsverse/transloco/commit/e435e9b3)) -- 🐛 remove unused group naming in regex ([0258c07](https://github.com/ngneat/transloco/commit/0258c07)), closes [#313](https://github.com/ngneat/transloco/issues/313) +### 💡 Refactor -### [2.18.2](https://github.com/ngneat/transloco/compare/v2.18.1...v2.18.2) (2020-07-16) +- **transloco:** 💡 Remove all the schematics but init ([6cd2f3e2](https://github.com/jsverse/transloco/commit/6cd2f3e2)) +- **transloco:** 💡 set tslib as dependency ([e76cb87a](https://github.com/jsverse/transloco/commit/e76cb87a)) +- **transloco:** 💡 remove flat from transloco's API ([1d241984](https://github.com/jsverse/transloco/commit/1d241984)) +- **schematics:** 💡 restructure schematics codebase ([0f8dc12b](https://github.com/jsverse/transloco/commit/0f8dc12b)) +- **schematics:** 💡 remove format from split and join ([053a4fa8](https://github.com/jsverse/transloco/commit/053a4fa8)) +- **persist-lang:** 💡 Add package optimizations ([d82c4bd5](https://github.com/jsverse/transloco/commit/d82c4bd5)) +- **persist-translations:** 💡 Add package optimizations ([b3933185](https://github.com/jsverse/transloco/commit/b3933185)) +- **preload-langs:** 💡 Add package optimizations ([5069fa48](https://github.com/jsverse/transloco/commit/5069fa48)) +- **optimize:** 💡 update node version ([d4d275ba](https://github.com/jsverse/transloco/commit/d4d275ba)) +- **scoped-libs:** 💡 update node version ([a9f6bc24](https://github.com/jsverse/transloco/commit/a9f6bc24)) +- **utils:** 💡 update node version ([a1f5b097](https://github.com/jsverse/transloco/commit/a1f5b097)) +- **validator:** 💡 update node version ([1ea9bf2f](https://github.com/jsverse/transloco/commit/1ea9bf2f)) -### Bug Fixes +### 💍 Tests -- 🐛 add injectable decorator ([94bb9ee](https://github.com/ngneat/transloco/commit/94bb9ee)) +- **transloco:** 💍 silent console errors in fallback specs ([8e27859a](https://github.com/jsverse/transloco/commit/8e27859a)) +- **messageformat:** 💍 fix test ([4edf9afc](https://github.com/jsverse/transloco/commit/4edf9afc)) -### [2.18.1](https://github.com/ngneat/transloco/compare/v2.18.0...v2.18.1) (2020-07-16) +### ✏️ Docs -### Bug Fixes +- **transloco:** ✏️ update breaking changes file ([5435da74](https://github.com/jsverse/transloco/commit/5435da74)) -- 🐛 export the functional transpiler ([2fc1a4f](https://github.com/ngneat/transloco/commit/2fc1a4f)) +### ⚠ BREAKING CHANGES -## [2.18.0](https://github.com/ngneat/transloco/compare/v2.17.5...v2.18.0) (2020-07-16) +- **All packages:** 🧨 Minimum Node.js version is now 18 +- **transloco:** 🧨 ng-add is the only available schematic in @jsverse/transloco now - other schematics moved to @jsverse/transloco-schematics +- **transloco:** 🧨 Some utility functions are no longer part of Transloco's public API - moved to @jsverse/utils +- **schematics:** 🧨 Remove the format option from the split & join schematics commands +- **schematics:** 🧨 Removed component and upgrade schematics +- **schematics:** 🧨 Renamed migrate directory to ngx-migrate for clarity -### Features +### ❤️ Thank You -- 🎸 functional transpiler ([d3c5262](https://github.com/ngneat/transloco/commit/d3c5262)) - -### [2.17.5](https://github.com/ngneat/transloco/compare/v2.17.4...v2.17.5) (2020-07-11) - -### Bug Fixes - -- 🐛 update keys manager installation to latest version ([#308](https://github.com/ngneat/transloco/issues/308)) ([d6f6526](https://github.com/ngneat/transloco/commit/d6f6526)) - -### [2.17.4](https://github.com/ngneat/transloco/compare/v2.17.2...v2.17.4) (2020-07-07) - -### Bug Fixes - -- 🐛 angular cli installing old transloco version ([79f8e10](https://github.com/ngneat/transloco/commit/79f8e10)), closes [#304](https://github.com/ngneat/transloco/issues/304) -- 🐛 Angular v10 BC fixes ([84ad417](https://github.com/ngneat/transloco/commit/84ad417)) - -### [2.17.3](https://github.com/ngneat/transloco/compare/v2.17.2...v2.17.3) (2020-06-28) - -### Bug Fixes - -- 🐛 Angular v10 BC fixes ([84ad417](https://github.com/ngneat/transloco/commit/84ad417)) - -### [2.17.2](https://github.com/ngneat/transloco/compare/v2.17.1...v2.17.2) (2020-06-04) - -### Bug Fixes - -- 🐛 getBrowserLang throws error when browser has no lang ([52c86c0](https://github.com/ngneat/transloco/commit/52c86c0)), closes [#289](https://github.com/ngneat/transloco/issues/289) - -### [2.17.1](https://github.com/ngneat/transloco/compare/v2.17.0...v2.17.1) (2020-05-01) - -### Bug Fixes - -- 🐛 migration script throws error when no files found ([db82974](https://github.com/ngneat/transloco/commit/db82974)) - -## [2.17.0](https://github.com/ngneat/transloco/compare/v2.16.1...v2.17.0) (2020-04-24) - -### Bug Fixes - -- 🐛 don't display loading template if translations were load ([#273](https://github.com/ngneat/transloco/issues/273)) ([c9214ad](https://github.com/ngneat/transloco/commit/c9214ad)) - -### Features - -- 🎸 support translating key-params map ([b261688](https://github.com/ngneat/transloco/commit/b261688)), closes [#272](https://github.com/ngneat/transloco/issues/272) - -### [2.16.1](https://github.com/ngneat/transloco/compare/v2.15.0...v2.16.1) (2020-04-23) - -## [2.14.0](https://github.com/ngneat/transloco/compare/v2.13.5...v2.14.0) (2020-03-14) - -### Features - -- 🎸 Add to missingHandler the translation's parameter(s) ([#255](https://github.com/ngneat/transloco/issues/255)) ([73256ce](https://github.com/ngneat/transloco/commit/73256ce)) - -### [2.13.5](https://github.com/ngneat/transloco/compare/v2.13.4...v2.13.5) (2020-03-01) - -### Bug Fixes - -- 🐛 ngx migration support new line in pipes ([00f1eae](https://github.com/ngneat/transloco/commit/00f1eae)), closes [#244](https://github.com/ngneat/transloco/issues/244) -- 🐛 set fallback translation ([ff34773](https://github.com/ngneat/transloco/commit/ff34773)), closes [#232](https://github.com/ngneat/transloco/issues/232) - -### [2.13.4](https://github.com/ngneat/transloco/compare/v2.13.3...v2.13.4) (2020-02-29) - -### Bug Fixes - -- **types:** Add additional formatting options ([#247](https://github.com/ngneat/transloco/issues/247)) ([05b6d79](https://github.com/ngneat/transloco/commit/05b6d79)) -- 🐛 update peed dependencies ([a1a813a](https://github.com/ngneat/transloco/commit/a1a813a)) - -### [2.13.3](https://github.com/ngneat/transloco/compare/v2.13.2...v2.13.3) (2020-02-12) - -### [2.13.2](https://github.com/ngneat/transloco/compare/v2.13.1...v2.13.2) (2020-02-03) - -### [2.13.1](https://github.com/ngneat/transloco/compare/v2.13.0...v2.13.1) (2020-02-02) - -### Bug Fixes - -- 🐛 testing module should work with ivy ([2a68be7](https://github.com/ngneat/transloco/commit/2a68be7)) - -## [2.13.0](https://github.com/ngneat/transloco/compare/v2.12.4...v2.13.0) (2020-01-25) - -### Features - -- 🎸 add support for getting config from path ([31c180a](https://github.com/ngneat/transloco/commit/31c180a)) -- 🎸 support inline loader for select translate ([#225](https://github.com/ngneat/transloco/issues/225)) ([a2b1867](https://github.com/ngneat/transloco/commit/a2b1867)) - -### [2.12.3](https://github.com/ngneat/transloco/compare/v2.12.2...v2.12.3) (2020-01-01) - -### Bug Fixes - -- 🐛 same fallback lang should not load again ([#211](https://github.com/ngneat/transloco/issues/211)) ([5498dee](https://github.com/ngneat/transloco/commit/5498dee)), closes [#210](https://github.com/ngneat/transloco/issues/210) - -### [2.12.2](https://github.com/ngneat/transloco/compare/v2.12.1...v2.12.2) (2019-12-24) - -### Bug Fixes - -- 🐛 select translate object not working with scopes ([32e1ad7](https://github.com/ngneat/transloco/commit/32e1ad7)), closes [#207](https://github.com/ngneat/transloco/issues/207) - -### [2.12.1](https://github.com/ngneat/transloco/compare/v2.12.0...v2.12.1) (2019-12-12) - -### Bug Fixes - -- 🐛 deprecate provideTranslocoConfig ([#198](https://github.com/ngneat/transloco/issues/198)) ([a8957d2](https://github.com/ngneat/transloco/commit/a8957d2)) - -## [2.12.0](https://github.com/ngneat/transloco/compare/v2.11.0...v2.12.0) (2019-12-11) - -### Bug Fixes - -- 🐛 pipe return empty string by default ([#192](https://github.com/ngneat/transloco/issues/192)) ([156cd62](https://github.com/ngneat/transloco/commit/156cd62)) -- 🐛 select translations with scope should listen to lang change ([6031046](https://github.com/ngneat/transloco/commit/6031046)) - -### Features - -- **transloco:** implement provideTranslocoConfig method ([#196](https://github.com/ngneat/transloco/issues/196)) ([2a755ae](https://github.com/ngneat/transloco/commit/2a755ae)), closes [#195](https://github.com/ngneat/transloco/issues/195) - -### [2.11.2](https://github.com/ngneat/transloco/compare/v2.11.0...v2.11.2) (2019-12-09) - -### Bug Fixes - -- 🐛 pipe return empty string by default ([#192](https://github.com/ngneat/transloco/issues/192)) ([156cd62](https://github.com/ngneat/transloco/commit/156cd62)) -- 🐛 select translations with scope should listen to lang change ([6031046](https://github.com/ngneat/transloco/commit/6031046)) - -### [2.11.1](https://github.com/ngneat/transloco/compare/v2.11.0...v2.11.1) (2019-12-07) - -### Bug Fixes - -- 🐛 select translations with scope should listen to lang change ([6031046](https://github.com/ngneat/transloco/commit/6031046)) - -## [2.11.0](https://github.com/ngneat/transloco/compare/v2.8.0...v2.11.0) (2019-12-06) - -### Bug Fixes - -- 🐛 preSaveTranslation should get the flattend object ([9174141](https://github.com/ngneat/transloco/commit/9174141)), closes [#145](https://github.com/ngneat/transloco/issues/145) -- 🐛 schematics scope useValue type ([2a2873c](https://github.com/ngneat/transloco/commit/2a2873c)) -- export TranslocoMissingHandlerData ([#174](https://github.com/ngneat/transloco/issues/174)) ([c32d589](https://github.com/ngneat/transloco/commit/c32d589)) -- Provide multiple values for TRANSLOCO_SCOPE to support lazy loading multiple json files ([#184](https://github.com/ngneat/transloco/issues/184)) ([fa11baa](https://github.com/ngneat/transloco/commit/fa11baa)) - -### Features - -- 🎸 add inline loader flag to scope ([#175](https://github.com/ngneat/transloco/issues/175)) ([8c1383e](https://github.com/ngneat/transloco/commit/8c1383e)) -- 🎸 schmeatics:join support ignore/include default lang ([7e48271](https://github.com/ngneat/transloco/commit/7e48271)) - -## [2.10.0](https://github.com/ngneat/transloco/compare/v2.8.0...v2.10.0) (2019-12-03) - -### Bug Fixes - -- 🐛 preSaveTranslation should get the flattend object ([9174141](https://github.com/ngneat/transloco/commit/9174141)), closes [#145](https://github.com/ngneat/transloco/issues/145) -- 🐛 schematics scope useValue type ([2a2873c](https://github.com/ngneat/transloco/commit/2a2873c)) -- export TranslocoMissingHandlerData ([#174](https://github.com/ngneat/transloco/issues/174)) ([c32d589](https://github.com/ngneat/transloco/commit/c32d589)) - -### Features - -- 🎸 add inline loader flag to scope ([#175](https://github.com/ngneat/transloco/issues/175)) ([8c1383e](https://github.com/ngneat/transloco/commit/8c1383e)) - -## [2.9.0](https://github.com/ngneat/transloco/compare/v2.8.0...v2.9.0) (2019-11-27) - -### Features - -- 🎸 add inline loader flag to scope ([#175](https://github.com/ngneat/transloco/issues/175)) ([8c1383e](https://github.com/ngneat/transloco/commit/8c1383e)) - -## [2.8.0](https://github.com/ngneat/transloco/compare/v2.7.0...v2.8.0) (2019-11-26) - -### Features - -- 🎸 pass scope name to loader ([c32b10c](https://github.com/ngneat/transloco/commit/c32b10c)) - -## [2.7.0](https://github.com/ngneat/transloco/compare/v2.6.0...v2.7.0) (2019-11-25) - -### Bug Fixes - -- 🐛 ng-add: skip translation files creation if exist ([#163](https://github.com/ngneat/transloco/issues/163)) ([a9c1bcf](https://github.com/ngneat/transloco/commit/a9c1bcf)) -- 🐛 remove missing keys warnings in tests ([#169](https://github.com/ngneat/transloco/issues/169)) ([741d356](https://github.com/ngneat/transloco/commit/741d356)) - -### Features - -- access to active language and up-to-date config in MissingHandler ([#167](https://github.com/ngneat/transloco/issues/167)) ([30af5c5](https://github.com/ngneat/transloco/commit/30af5c5)), closes [#164](https://github.com/ngneat/transloco/issues/164) - -### [2.6.2](https://github.com/ngneat/transloco/compare/v2.6.1...v2.6.2) (2019-11-23) - -### Bug Fixes - -- 🐛 remove missing keys warnings in tests ([#169](https://github.com/ngneat/transloco/issues/169)) ([741d356](https://github.com/ngneat/transloco/commit/741d356)) - -### [2.6.1](https://github.com/ngneat/transloco/compare/v2.6.0...v2.6.1) (2019-11-20) - -### Bug Fixes - -- 🐛 ng-add: skip translation files creation if exist ([#163](https://github.com/ngneat/transloco/issues/163)) ([a9c1bcf](https://github.com/ngneat/transloco/commit/a9c1bcf)) - -## [2.6.0](https://github.com/ngneat/transloco/compare/v2.5.2...v2.6.0) (2019-11-17) - -### Features - -- 🎸 add schematics migration script from angular ([#151](https://github.com/ngneat/transloco/issues/151)) ([bc07dfa](https://github.com/ngneat/transloco/commit/bc07dfa)) -- 🎸 allow changing the fallback languages dynamically ([2719981](https://github.com/ngneat/transloco/commit/2719981)) - -### [2.5.2](https://github.com/ngneat/transloco/compare/v2.5.1...v2.5.2) (2019-11-05) - -### Bug Fixes - -- 🐛 remove default langs ([d9b6b26](https://github.com/ngneat/transloco/commit/d9b6b26)) - -### [2.5.1](https://github.com/ngneat/transloco/compare/v2.5.0...v2.5.1) (2019-11-05) - -### Bug Fixes - -- 🐛 add utils ([c6233b7](https://github.com/ngneat/transloco/commit/c6233b7)) - -## [2.5.0](https://github.com/ngneat/transloco/compare/v2.4.0...v2.5.0) (2019-11-05) - -### Bug Fixes - -- 🐛 schematics scope ignore routing.module file ([57dbcd5](https://github.com/ngneat/transloco/commit/57dbcd5)) - -### Features - -- 🎸 inline-loader support any kind of promise ([34bc788](https://github.com/ngneat/transloco/commit/34bc788)) -- 🎸 schematics command to install keys manager ([38c885b](https://github.com/ngneat/transloco/commit/38c885b)) - -## [2.4.0](https://github.com/ngneat/transloco/compare/v2.3.1...v2.4.0) (2019-11-01) - -### Features - -- 🎸 add scope to event payload ([f70db69](https://github.com/ngneat/transloco/commit/f70db69)) - -### [2.3.1](https://github.com/ngneat/transloco/compare/v2.3.0...v2.3.1) (2019-10-30) - -### Bug Fixes - -- 🐛 predavetranslation should always be flat ([2f12e71](https://github.com/ngneat/transloco/commit/2f12e71)), closes [#145](https://github.com/ngneat/transloco/issues/145) - -## [2.3.0](https://github.com/ngneat/transloco/compare/v2.2.2...v2.3.0) (2019-10-25) - -### Features - -- 🎸 add logMissingKey option to missing handler ([c2d368b](https://github.com/ngneat/transloco/commit/c2d368b)) - -### [2.2.2](https://github.com/ngneat/transloco/compare/v2.2.1...v2.2.2) (2019-10-21) - -### Bug Fixes - -- 🐛 remove redundant dep ([dad9269](https://github.com/ngneat/transloco/commit/dad9269)) - -### [2.2.1](https://github.com/ngneat/transloco/compare/v2.2.0...v2.2.1) (2019-10-17) - -### Bug Fixes - -- 🐛 protect unsubscribing in pipe ([b55bd59](https://github.com/ngneat/transloco/commit/b55bd59)), closes [#137](https://github.com/ngneat/transloco/issues/137) - -## [2.2.0](https://github.com/ngneat/transloco/compare/v2.1.2...v2.2.0) (2019-10-14) - -### Features - -- 🎸 add merge translation files command ([28f1af9](https://github.com/ngneat/transloco/commit/28f1af9)) -- 🎸 add spill schematics command ([f3ad130](https://github.com/ngneat/transloco/commit/f3ad130)) -- 🎸 inline loaders ([1648de4](https://github.com/ngneat/transloco/commit/1648de4)) - -### Tests - -- 💍 schematics spill command ([d57fa82](https://github.com/ngneat/transloco/commit/d57fa82)) -- 💍 test schematics merge command ([5484520](https://github.com/ngneat/transloco/commit/5484520)) - -### [2.1.2](https://github.com/ngneat/transloco/compare/v2.1.1...v2.1.2) (2019-10-11) - -### Bug Fixes - -- 🐛 inline lang for pipe ([72082c0](https://github.com/ngneat/transloco/commit/72082c0)) - -### Tests - -- 💍 refactor and add specs ([ae7210a](https://github.com/ngneat/transloco/commit/ae7210a)) - -### [2.1.1](https://github.com/ngneat/transloco/compare/v2.1.0...v2.1.1) (2019-10-05) - -### Bug Fixes - -- 🐛 add key prefix when translating scope ([#116](https://github.com/ngneat/transloco/issues/116)) ([a84ceb3](https://github.com/ngneat/transloco/commit/a84ceb3)) - -## [2.1.0](https://github.com/ngneat/transloco/compare/v2.0.4...v2.1.0) (2019-10-04) - -### Features - -- 🎸 alias pr merge fix ([7e3ab3f](https://github.com/ngneat/transloco/commit/7e3ab3f)) - -### [2.0.4](https://github.com/ngneat/transloco/compare/v2.0.3...v2.0.4) (2019-10-04) - -### Bug Fixes - -- 🐛 fix type in the structural directive ([3144b51](https://github.com/ngneat/transloco/commit/3144b51)) - -### Tests - -- 💍 fix messageformat spec ([eebd8a4](https://github.com/ngneat/transloco/commit/eebd8a4)) - -### [2.0.3](https://github.com/ngneat/transloco/compare/v2.0.2...v2.0.3) (2019-10-03) - -### [2.0.2](https://github.com/ngneat/transloco/compare/v2.0.1...v2.0.2) (2019-10-03) - -### Bug Fixes - -- 🐛 fix v2 upgrade script ([e390ae4](https://github.com/ngneat/transloco/commit/e390ae4)) - -### [2.0.1](https://github.com/ngneat/transloco/compare/v2.0.0...v2.0.1) (2019-10-02) - -### Bug Fixes - -- 🐛 missing handler fix allow empty values in pipe ([2efbe6c](https://github.com/ngneat/transloco/commit/2efbe6c)) - -## [2.0.0](https://github.com/ngneat/transloco/compare/v1.7.8...v2.0.0) (2019-10-02) - -### Bug Fixes - -- 🐛 ng-add: fix hard coded fallbackLang ([#90](https://github.com/ngneat/transloco/issues/90)) ([9b1239f](https://github.com/ngneat/transloco/commit/9b1239f)) -- schematics ng-add availabeLangs ([8b6424d](https://github.com/ngneat/transloco/commit/8b6424d)) - -### Features - -- 🎸 change structural to function ([1945686](https://github.com/ngneat/transloco/commit/1945686)) -- 🎸 missing translation fallback ([8151c24](https://github.com/ngneat/transloco/commit/8151c24)) -- 🎸 v2 changes ([430fadf](https://github.com/ngneat/transloco/commit/430fadf)) -- 🤖 Add schematics for transloco scope ([#79](https://github.com/ngneat/transloco/issues/79)) ([aea9495](https://github.com/ngneat/transloco/commit/aea9495)) - -### Tests - -- 💍 add fallback specs ([d5d91e6](https://github.com/ngneat/transloco/commit/d5d91e6)) -- 💍 update lazy spec ([ab2e627](https://github.com/ngneat/transloco/commit/ab2e627)) - -### BREAKING CHANGES - -- See in BREAKING_CHANGES.md file - -### [1.7.9](https://github.com/ngneat/transloco/compare/v1.7.8...v1.7.9) (2019-09-17) - -### [1.7.8](https://github.com/ngneat/transloco/compare/v1.7.7...v1.7.8) (2019-09-11) - -### Bug Fixes - -- 🐛 update migration script ([c7510f7](https://github.com/ngneat/transloco/commit/c7510f7)) - -### [1.7.7](https://github.com/ngneat/transloco/compare/v1.7.6...v1.7.7) (2019-09-11) - -### Bug Fixes - -- **testing:** set prodmode to true by default ([5995b75](https://github.com/ngneat/transloco/commit/5995b75)) - -### [1.7.6](https://github.com/ngneat/transloco/compare/v1.7.5...v1.7.6) (2019-09-09) - -### Bug Fixes - -- 🐛 allow pass config in testing module ([caeaa8c](https://github.com/ngneat/transloco/commit/caeaa8c)) - -### [1.7.5](https://github.com/ngneat/transloco/compare/v1.7.4...v1.7.5) (2019-09-08) - -### Bug Fixes - -- **core:** lack of unsubscriptions ([#65](https://github.com/ngneat/transloco/issues/65)) ([67f5d3f](https://github.com/ngneat/transloco/commit/67f5d3f)) -- 🐛 pipe should support any type ([bf3f11c](https://github.com/ngneat/transloco/commit/bf3f11c)), closes [#70](https://github.com/ngneat/transloco/issues/70) - -### [1.7.4](https://github.com/ngneat/transloco/compare/v1.7.3...v1.7.4) (2019-09-07) - -### Bug Fixes - -- 🐛 scope mapping ([a3545a1](https://github.com/ngneat/transloco/commit/a3545a1)), closes [#69](https://github.com/ngneat/transloco/issues/69) - -### [1.7.3](https://github.com/ngneat/transloco/compare/v1.7.2...v1.7.3) (2019-09-06) - -### Bug Fixes - -- 🐛 transpiler protection ([9471f17](https://github.com/ngneat/transloco/commit/9471f17)) - -### [1.7.2](https://github.com/ngneat/transloco/compare/v1.7.1...v1.7.2) (2019-09-05) - -### Bug Fixes - -- 🐛 update migration script ([b712bd7](https://github.com/ngneat/transloco/commit/b712bd7)) - -### [1.7.1](https://github.com/ngneat/transloco/compare/v1.7.0...v1.7.1) (2019-09-03) - -### Bug Fixes - -- 🐛 selectTranslate ([a7af5c6](https://github.com/ngneat/transloco/commit/a7af5c6)) - -## [1.7.0](https://github.com/ngneat/transloco/compare/v1.6.0...v1.7.0) (2019-09-01) - -### Bug Fixes - -- remove extension from missing handler export ([e756079](https://github.com/ngneat/transloco/commit/e756079)) -- **readme:** add missing @ ([#51](https://github.com/ngneat/transloco/issues/51)) ([2216378](https://github.com/ngneat/transloco/commit/2216378)) - -### Features - -- 🎸 multi-lang ([8d91b61](https://github.com/ngneat/transloco/commit/8d91b61)) -- 🎸 mutli-langs ([0e58324](https://github.com/ngneat/transloco/commit/0e58324)) -- 🎸 transpilers ([198eb6d](https://github.com/ngneat/transloco/commit/198eb6d)) -- expose missing handler token and interface ([1a56908](https://github.com/ngneat/transloco/commit/1a56908)) - -## [1.6.0](https://github.com/ngneat/transloco/compare/v1.5.0...v1.6.0) (2019-08-28) - -### Features - -- limit nested translations ([71e5488](https://github.com/ngneat/transloco/commit/71e5488)) -- **directive:** add limit property ([7715deb](https://github.com/ngneat/transloco/commit/7715deb)) -- **directive:** add limit property ([f17f417](https://github.com/ngneat/transloco/commit/f17f417)) -- **directive:** read nested property ([b51359e](https://github.com/ngneat/transloco/commit/b51359e)) -- **directive:** set context to a nested property ([561cba4](https://github.com/ngneat/transloco/commit/561cba4)) - -## [1.5.0](https://github.com/ngneat/transloco/compare/v1.4.2...v1.5.0) (2019-08-28) - -### Bug Fixes - -- 🐛 translate types ([fe51317](https://github.com/ngneat/transloco/commit/fe51317)) - -### Features - -- 🎸 missing-handler ([23da8c5](https://github.com/ngneat/transloco/commit/23da8c5)), closes [#42](https://github.com/ngneat/transloco/issues/42) -- 🎸 missing-handler ([#43](https://github.com/ngneat/transloco/issues/43)) ([5f082fc](https://github.com/ngneat/transloco/commit/5f082fc)) -- **loader:** allow it to be optional ([2a7fd83](https://github.com/ngneat/transloco/commit/2a7fd83)) -- 🎸 service ([317bfc8](https://github.com/ngneat/transloco/commit/317bfc8)), closes [#46](https://github.com/ngneat/transloco/issues/46) - -### Tests - -- 💍 allow-empty ([ba33ea1](https://github.com/ngneat/transloco/commit/ba33ea1)) - -### [1.4.2](https://github.com/ngneat/transloco/compare/v1.4.0...v1.4.2) (2019-08-27) - -### Bug Fixes - -- 🐛 message-format ([ff835c3](https://github.com/ngneat/transloco/commit/ff835c3)), closes [#40](https://github.com/ngneat/transloco/issues/40) -- 🐛 migration script support for get function ([67e112d](https://github.com/ngneat/transloco/commit/67e112d)) -- 🐛 translate ([620b151](https://github.com/ngneat/transloco/commit/620b151)), closes [#40](https://github.com/ngneat/transloco/issues/40) - -### [1.4.1](https://github.com/ngneat/transloco/compare/v1.4.0...v1.4.1) (2019-08-27) - -### Bug Fixes - -- 🐛 message-format ([ff835c3](https://github.com/ngneat/transloco/commit/ff835c3)), closes [#40](https://github.com/ngneat/transloco/issues/40) -- 🐛 migration script support for get function ([67e112d](https://github.com/ngneat/transloco/commit/67e112d)) -- 🐛 translate ([620b151](https://github.com/ngneat/transloco/commit/620b151)), closes [#40](https://github.com/ngneat/transloco/issues/40) - -## [1.4.0](https://github.com/ngneat/transloco/compare/v1.2.0...v1.4.0) (2019-08-27) - -### Bug Fixes - -- 🎸 support using ng-add for libraries ([8ba6f25](https://github.com/ngneat/transloco/commit/8ba6f25)) -- 🐛 global scoep translations in pipe and directive ([c4d0993](https://github.com/ngneat/transloco/commit/c4d0993)) -- 🐛 global scope might not be loaded when sharing scope ([d094764](https://github.com/ngneat/transloco/commit/d094764)) -- **api:** expose helpers and types ([19e1a7f](https://github.com/ngneat/transloco/commit/19e1a7f)) - -### Features - -- 🎸 scope strategy - shared ([84eb7ec](https://github.com/ngneat/transloco/commit/84eb7ec)) - -### Tests - -- 💍 finish testing ([104ecd3](https://github.com/ngneat/transloco/commit/104ecd3)) -- 💍 fix cypress specs ([7fdfe11](https://github.com/ngneat/transloco/commit/7fdfe11)) -- 💍 shared scope - update specs ([50f3362](https://github.com/ngneat/transloco/commit/50f3362)) - -## [1.3.0](https://github.com/ngneat/transloco/compare/v1.2.0...v1.3.0) (2019-08-26) - -### Bug Fixes - -- 🐛 global scoep translations in pipe and directive ([c4d0993](https://github.com/ngneat/transloco/commit/c4d0993)) -- 🐛 global scope might not be loaded when sharing scope ([d094764](https://github.com/ngneat/transloco/commit/d094764)) - -### Features - -- 🎸 scope strategy - shared ([84eb7ec](https://github.com/ngneat/transloco/commit/84eb7ec)) - -### Tests - -- 💍 finish testing ([104ecd3](https://github.com/ngneat/transloco/commit/104ecd3)) -- 💍 fix cypress specs ([7fdfe11](https://github.com/ngneat/transloco/commit/7fdfe11)) -- 💍 shared scope - update specs ([50f3362](https://github.com/ngneat/transloco/commit/50f3362)) - -## [1.2.0](https://github.com/ngneat/transloco/compare/v1.0.1...v1.2.0) (2019-08-23) - -### Bug Fixes - -- 🐛 fix format message import ([f8815dc](https://github.com/ngneat/transloco/commit/f8815dc)) -- 🐛 schematics ng-add import-default bug ([#29](https://github.com/ngneat/transloco/issues/29)) ([35229e0](https://github.com/ngneat/transloco/commit/35229e0)) - -### Build System - -- add peerDependencies to package.json ([22b0af5](https://github.com/ngneat/transloco/commit/22b0af5)) - -### Features - -- **lib:** 🎸 add messageformat support through custom transpiler ([#11](https://github.com/ngneat/transloco/issues/11)) ([1feb309](https://github.com/ngneat/transloco/commit/1feb309)) -- 🎸 added ssr question to ng-add ([#30](https://github.com/ngneat/transloco/issues/30)) ([7bcd15d](https://github.com/ngneat/transloco/commit/7bcd15d)) -- 🎸 lib ([ab5a6fb](https://github.com/ngneat/transloco/commit/ab5a6fb)) - -### [1.1.3](https://github.com/ngneat/transloco/compare/v1.0.1...v1.1.3) (2019-08-22) - -### Bug Fixes - -- 🐛 fix format message import ([f8815dc](https://github.com/ngneat/transloco/commit/f8815dc)) -- 🐛 schematics ng-add import-default bug ([#29](https://github.com/ngneat/transloco/issues/29)) ([35229e0](https://github.com/ngneat/transloco/commit/35229e0)) - -### Build System - -- add peerDependencies to package.json ([22b0af5](https://github.com/ngneat/transloco/commit/22b0af5)) - -### Features - -- 🎸 added ssr question to ng-add ([#30](https://github.com/ngneat/transloco/issues/30)) ([7bcd15d](https://github.com/ngneat/transloco/commit/7bcd15d)) -- **lib:** 🎸 add messageformat support through custom transpiler ([#11](https://github.com/ngneat/transloco/issues/11)) ([1feb309](https://github.com/ngneat/transloco/commit/1feb309)) - -### [1.1.2](https://github.com/ngneat/transloco/compare/v1.0.1...v1.1.2) (2019-08-22) - -### Bug Fixes - -- 🐛 fix format message import ([f8815dc](https://github.com/ngneat/transloco/commit/f8815dc)) -- 🐛 schematics ng-add import-default bug ([#29](https://github.com/ngneat/transloco/issues/29)) ([35229e0](https://github.com/ngneat/transloco/commit/35229e0)) - -### Build System - -- add peerDependencies to package.json ([22b0af5](https://github.com/ngneat/transloco/commit/22b0af5)) - -### Features - -- 🎸 added ssr question to ng-add ([#30](https://github.com/ngneat/transloco/issues/30)) ([7bcd15d](https://github.com/ngneat/transloco/commit/7bcd15d)) -- **lib:** 🎸 add messageformat support through custom transpiler ([#11](https://github.com/ngneat/transloco/issues/11)) ([1feb309](https://github.com/ngneat/transloco/commit/1feb309)) - -## [1.1.0](https://github.com/ngneat/transloco/compare/v1.0.1...v1.1.0) (2019-08-16) - -### Features - -- **lib:** 🎸 add messageformat support through custom transpiler ([#11](https://github.com/ngneat/transloco/issues/11)) ([1feb309](https://github.com/ngneat/transloco/commit/1feb309)) - -## 1.0.0 (2019-08-16) - -### Bug Fixes - -- 🐛 fix ngx-translate migration script ([dfe47bf](https://github.com/ngneat/transloco/commit/dfe47bf)) -- 🐛 get value function ([2a9d0a4](https://github.com/ngneat/transloco/commit/2a9d0a4)) -- 🐛 migration script special chars ([9f9a917](https://github.com/ngneat/transloco/commit/9f9a917)) -- 🐛 missing dependencies, angular schematics path ([fb94489](https://github.com/ngneat/transloco/commit/fb94489)) -- 🐛 missing handler should return the missing key ([05297f1](https://github.com/ngneat/transloco/commit/05297f1)) -- 🐛 service load issues ([82b9321](https://github.com/ngneat/transloco/commit/82b9321)) -- 🐛 update dependencies ([530bb30](https://github.com/ngneat/transloco/commit/530bb30)) -- **migration:** fix script ([6fc9e7b](https://github.com/ngneat/transloco/commit/6fc9e7b)) -- **query:** fix query params getter ([63a8224](https://github.com/ngneat/transloco/commit/63a8224)) -- **schematics:** ng-add schematics fixes ([#35](https://github.com/ngneat/transloco/issues/35)) ([10d4146](https://github.com/ngneat/transloco/commit/10d4146)) -- **schematics:** when the user chose http as loader add HttpClien… ([#54](https://github.com/ngneat/transloco/issues/54)) ([66b07f6](https://github.com/ngneat/transloco/commit/66b07f6)) -- **schematics:** when the user chose http as loader add HttpClientModule ([e5e0766](https://github.com/ngneat/transloco/commit/e5e0766)) -- **transloco-service:** pr fixes ([4f276d1](https://github.com/ngneat/transloco/commit/4f276d1)) -- fix tests ([fc841bd](https://github.com/ngneat/transloco/commit/fc841bd)) -- handle parser error when couldn't parse ([a016030](https://github.com/ngneat/transloco/commit/a016030)) - -### Build System - -- **lock file:** update lock file ([f410e17](https://github.com/ngneat/transloco/commit/f410e17)) - -### Features - -- **schematics:** added generator for transloco component ([#61](https://github.com/ngneat/transloco/issues/61)) ([82d8df3](https://github.com/ngneat/transloco/commit/82d8df3)) -- **schematics:** added ng-add schematics command ([#32](https://github.com/ngneat/transloco/issues/32)) ([71c53f1](https://github.com/ngneat/transloco/commit/71c53f1)) -- **schematics:** support project in ng-add ([#5](https://github.com/ngneat/transloco/issues/5)) ([3fbdd41](https://github.com/ngneat/transloco/commit/3fbdd41)) -- **specs:** add cypress ([a2605dc](https://github.com/ngneat/transloco/commit/a2605dc)) -- **specs:** add specs coverage ([7016f88](https://github.com/ngneat/transloco/commit/7016f88)) -- **transloco-pipe:** support providerLang ([bc3e809](https://github.com/ngneat/transloco/commit/bc3e809)) -- **transloco-service:** dependentless translate ([9ad22ad](https://github.com/ngneat/transloco/commit/9ad22ad)) -- **transloco-service:** getTranslation should support get all ([e12e5f6](https://github.com/ngneat/transloco/commit/e12e5f6)), closes [#58](https://github.com/ngneat/transloco/issues/58) -- **transloco-service:** support multiple fallback langs ([0e630bc](https://github.com/ngneat/transloco/commit/0e630bc)), closes [#40](https://github.com/ngneat/transloco/issues/40) -- **transloco-service:** support translating using a callback ([067ad98](https://github.com/ngneat/transloco/commit/067ad98)), closes [#56](https://github.com/ngneat/transloco/issues/56) -- added global loading template token ([e4a87eb](https://github.com/ngneat/transloco/commit/e4a87eb)) -- added global loading template token ([#55](https://github.com/ngneat/transloco/issues/55)) ([34183dd](https://github.com/ngneat/transloco/commit/34183dd)) -- added setTranslation && setTranslationKey methods ([fdf2ade](https://github.com/ngneat/transloco/commit/fdf2ade)) -- added support for multi key translation ([#46](https://github.com/ngneat/transloco/issues/46)) ([15378c5](https://github.com/ngneat/transloco/commit/15378c5)) -- lazy load ([6dc1f72](https://github.com/ngneat/transloco/commit/6dc1f72)) -- lazy load ([ee68219](https://github.com/ngneat/transloco/commit/ee68219)) - -### Tests - -- 💍 add key is path test ([2406bd8](https://github.com/ngneat/transloco/commit/2406bd8)) -- 💍 cypress ([fd3622b](https://github.com/ngneat/transloco/commit/fd3622b)) -- 💍 update specs ([5f0629c](https://github.com/ngneat/transloco/commit/5f0629c)) -- **transloco-transpiler:** add spec for nested lang keys ([9dc7875](https://github.com/ngneat/transloco/commit/9dc7875)) -- add missing coverage specs ([101f1f1](https://github.com/ngneat/transloco/commit/101f1f1)) -- added e2e test to lazy page ([f06c922](https://github.com/ngneat/transloco/commit/f06c922)), closes [#33](https://github.com/ngneat/transloco/issues/33) -- created change-translation e2e tests ([e693c12](https://github.com/ngneat/transloco/commit/e693c12)) -- cypress prod url ([4c464a6](https://github.com/ngneat/transloco/commit/4c464a6)) -- **transloco-service:** add specs ([3af51c6](https://github.com/ngneat/transloco/commit/3af51c6)) -- **transloco-service:** fix pr ([58b6624](https://github.com/ngneat/transloco/commit/58b6624)) -- test params pipe ([331b7e0](https://github.com/ngneat/transloco/commit/331b7e0)) -- test params pipe ([#27](https://github.com/ngneat/transloco/issues/27)) ([1ffa3a2](https://github.com/ngneat/transloco/commit/1ffa3a2)) +- chaitanay94 @chaitanay94 +- Shahar Kazaz @shaharkazaz diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 1baab90f5..654a24c78 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -8,13 +8,34 @@ Start by installing all dependencies: ```bash npm i +yarn ``` +The Transloco project is a monorepo managed by nx with the following structure: + +Packages: + +- transloco +- transloco-locale +- transloco-messageformat +- transloco-optimize +- transloco-presist-lang +- transloco-presist-translations +- transloco-preload-langs +- transloco-schematics +- transloco-utils +- transloco-validator + +Apps: + +- transloco-playground +- transloco-playground-e2e (cypress) + Run the tests: ```bash -npm test -npm run e2e +nx test [package-name] +nx e2e transloco-playground-e2e ``` Run the playground app: @@ -23,53 +44,55 @@ Run the playground app: npm start ``` -## Building +## Contributing to the Documentation -```bash -npm run build -``` +The Transloco documentation is hosted on GitBook and managed in the `gitbook-docs` branch. + +### Steps to Contribute: + +1. **Ensure you are working with the `gitbook-docs`** + +2. **Install Dependencies** + Run the following commands to install the required dependencies: + + ```bash + npm i + yarn + ``` + +3. **Make Your Changes** + Edit or add documentation files located in the `gitbook-docs` branch. + +4. **Preview Your Changes** + Use GitBook CLI or relevant tools to preview the documentation locally if needed. -## Coding Rules +5. **Submit a Pull Request** + Once your changes are complete, push your branch and open a PR to the `gitbook-docs` branch. Make sure to clearly describe the changes in the PR description. + +We welcome contributions that improve clarity, fix typos, add examples, or enhance the existing content! + +## Coding Rules To ensure consistency throughout the source code, keep these rules in mind as you are working: - All features or bug fixes **must be tested** by one or more specs (unit-tests). - All public API methods **must be documented**. -## Commit Message Guidelines +## Commit Message Guidelines We have very precise rules over how our git commit messages can be formatted. This leads to **more readable messages** that are easy to follow when looking through the **project history**. But also, -we use the git commit messages to **generate the Akita changelog**. +we use the git commit messages to **generate the changelog**. ### Commit Message Format -Each commit message consists of a **header**, a **body** and a **footer**. The header has a special -format that includes a **type**, a **scope** and a **subject**: - -``` -(): - - - -