Skip to content

Commit

Permalink
feat: use type: module everywhere
Browse files Browse the repository at this point in the history
  • Loading branch information
stepan662 authored Feb 10, 2023
1 parent 10cc8e6 commit 05cf4b5
Show file tree
Hide file tree
Showing 69 changed files with 878 additions and 6,429 deletions.
1 change: 0 additions & 1 deletion .github/workflows/publish-examples-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ jobs:
[
'react',
'next',
'gatsby',
'vue',
'svelte',
'ngx',
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/publish-examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ jobs:
[
'react',
'next',
'gatsby',
'vue',
'svelte',
'ngx',
Expand Down
2 changes: 0 additions & 2 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,4 @@

**/*.generated.*
**/*.md
testapps/gatsby/public
testapps/gatsby/.cache
testapps/next/.next
28 changes: 0 additions & 28 deletions e2e/cypress/e2e/gatsby/0.prod.cy.ts

This file was deleted.

31 changes: 0 additions & 31 deletions e2e/cypress/e2e/gatsby/1.dev.cy.ts

This file was deleted.

4 changes: 2 additions & 2 deletions e2e/cypress/e2e/web/base.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ context('Base test', () => {
cy.visit('http://localhost:8101/base/');
});

it('is working for all bundles', () => {
it('is working', () => {
const xpath = cy.xpath("//*[contains(text(), 'This is test text!')]");
xpath.should('have.length', 4);
xpath.should('have.length', 2);
});
});
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
"develop:ngx": "npm run develop -- --scope=@tolgee/ngx-testapp --scope=@tolgee/ngx-workspace",
"develop:next": "npm run develop -- --scope=@tolgee/next-testapp",
"develop:next-internal": "npm run develop -- --scope=@tolgee/next-internal-testapp",
"develop:gatsby": "npm run develop -- --scope=@tolgee/gatsby-testapp",
"develop:react-i18next": "npm run develop -- --scope=@tolgee/react-i18next-testapp",
"develop:vue-i18next": "npm run develop -- --scope=@tolgee/vue-i18next-testapp",
"build:e2e": "turbo run build:e2e --cache-dir='.turbo'",
Expand Down
1 change: 0 additions & 1 deletion packages/core/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ For more information about Tolgee JS integrations, visit the [docs](https://tolg
- [Vue](https://tolgee.io/integrations/vue)
- [Svelte](https://tolgee.io/integrations/svelte)
- [Next.js](https://tolgee.io/integrations/next)
- [Gatsby](https://tolgee.io/integrations/gatsby)
- [More...](https://tolgee.io/integrations/all)
- [Tolgee platform docs](https://tolgee.io/platform)

Expand Down
8 changes: 6 additions & 2 deletions packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"main": "./dist/tolgee.cjs.js",
"module": "./dist/tolgee.esm.js",
"types": "./lib/index.d.ts",
"type": "module",
"repository": {
"type": "git",
"url": "https://github.com/tolgee/tolgee-js"
Expand All @@ -20,8 +21,11 @@
],
"declaration": true,
"exports": {
"require": "./dist/tolgee.cjs.js",
"import": "./dist/tolgee.esm.js"
".": {
"require": "./dist/tolgee.cjs.js",
"import": "./dist/tolgee.esm.js"
},
"./package.json": "./package.json"
},
"directories": {
"lib": "lib",
Expand Down
1 change: 0 additions & 1 deletion packages/format-icu/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ For more information about the Tolgee ICU Format plugin, visit the [docs](https:
- [Vue](https://tolgee.io/integrations/vue)
- [Svelte](https://tolgee.io/integrations/svelte)
- [Next.js](https://tolgee.io/integrations/next)
- [Gatsby](https://tolgee.io/integrations/gatsby)
- [More...](https://tolgee.io/integrations/all)
- [Tolgee platform docs](https://tolgee.io/platform)

Expand Down
8 changes: 6 additions & 2 deletions packages/format-icu/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"main": "./dist/tolgee-format-icu.cjs.js",
"module": "./dist/tolgee-format-icu.esm.js",
"types": "./lib/index.d.ts",
"type": "module",
"repository": {
"type": "git",
"url": "https://github.com/tolgee/tolgee-js"
Expand All @@ -24,8 +25,11 @@
"dist": "dist"
},
"exports": {
"require": "./dist/tolgee-format-icu.cjs.js",
"import": "./dist/tolgee-format-icu.esm.js"
".": {
"require": "./dist/tolgee-format-icu.cjs.js",
"import": "./dist/tolgee-format-icu.esm.js"
},
"./package.json": "./package.json"
},
"scripts": {
"build": "rollup -c rollup.config.js && tsc --declaration --emitDeclarationOnly --project tsconfig.prod.json",
Expand Down
2 changes: 1 addition & 1 deletion packages/i18next/jest.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module.exports = {
export default {
automock: true,
preset: 'ts-jest',
testEnvironment: 'jsdom',
Expand Down
8 changes: 6 additions & 2 deletions packages/i18next/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"main": "./dist/tolgee-i18next.cjs.js",
"module": "./dist/tolgee-i18next.esm.js",
"types": "./lib/index.d.ts",
"type": "module",
"repository": {
"type": "git",
"url": "https://github.com/tolgee/tolgee-js"
Expand Down Expand Up @@ -64,8 +65,11 @@
"i18next": "^21.5.4"
},
"exports": {
"require": "./dist/tolgee-i18next.cjs.js",
"import": "./dist/tolgee-i18next.esm.js"
".": {
"require": "./dist/tolgee-i18next.cjs.js",
"import": "./dist/tolgee-i18next.esm.js"
},
"./package.json": "./package.json"
},
"dependencies": {
"@tolgee/web": "5.2.1"
Expand Down
2 changes: 1 addition & 1 deletion packages/react/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ Tolgee is an open-source alternative to Crowdin, Phrase, or Lokalise with its ve
React integration library of Tolgee. This package makes it super simple to add i18n to your React app!
For more information about using Tolgee with React, visit the [docs 📖](https://tolgee.io/integrations/react).

Localize (translate) your CRA, Gatsby, Next.js, or other React projects to multiple languages with Tolgee. Integration of Tolgee is extremely simple! 🇯🇵 🇰🇷 🇩🇪 🇨🇳 🇺🇸 🇫🇷 🇪🇸 🇮🇹 🇷🇺 🇬🇧
Localize (translate) your CRA, Next.js, or other React projects to multiple languages with Tolgee. Integration of Tolgee is extremely simple! 🇯🇵 🇰🇷 🇩🇪 🇨🇳 🇺🇸 🇫🇷 🇪🇸 🇮🇹 🇷🇺 🇬🇧


## Quick links
Expand Down
2 changes: 1 addition & 1 deletion packages/react/README.njk.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
React integration library of Tolgee. This package makes it super simple to add i18n to your React app!
For more information about using Tolgee with React, visit the [docs 📖](https://tolgee.io/integrations/react).

Localize (translate) your CRA, Gatsby, Next.js, or other React projects to multiple languages with Tolgee. Integration of Tolgee is extremely simple! 🇯🇵 🇰🇷 🇩🇪 🇨🇳 🇺🇸 🇫🇷 🇪🇸 🇮🇹 🇷🇺 🇬🇧
Localize (translate) your CRA, Next.js, or other React projects to multiple languages with Tolgee. Integration of Tolgee is extremely simple! 🇯🇵 🇰🇷 🇩🇪 🇨🇳 🇺🇸 🇫🇷 🇪🇸 🇮🇹 🇷🇺 🇬🇧

{{ macros.integrationLinks('Tolgee for React docs', macros.v5link('integrations/react/installation')) }}

Expand Down
8 changes: 1 addition & 7 deletions packages/react/jest.config.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,10 @@
const { pathsToModuleNameMapper } = require('ts-jest');
const { compilerOptions } = require('./tsconfig');

module.exports = {
export default {
preset: 'ts-jest',
testEnvironment: 'jsdom',
unmockedModulePathPatterns: ['/node_modules/*'],
modulePathIgnorePatterns: ['cypress'],
transformIgnorePatterns: ['node_modules/(?!@tolgee/web)'],
roots: ['src'],
moduleNameMapper: pathsToModuleNameMapper(compilerOptions.paths, {
prefix: '<rootDir>/',
}),
globals: {
'ts-jest': {
tsconfig: 'tsconfig.spec.json',
Expand Down
8 changes: 6 additions & 2 deletions packages/react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"main": "./dist/tolgee-react.cjs.js",
"module": "./dist/tolgee-react.esm.js",
"types": "lib/index.d.ts",
"type": "module",
"repository": "https://github.com/tolgee/tolgee-js",
"homepage": "https://tolgee.io",
"keywords": [
Expand Down Expand Up @@ -69,8 +70,11 @@
"typescript": "^4.7.4"
},
"exports": {
"require": "./dist/tolgee-react.cjs.js",
"import": "./dist/tolgee-react.esm.js"
".": {
"require": "./dist/tolgee-react.cjs.js",
"import": "./dist/tolgee-react.esm.js"
},
"./package.json": "./package.json"
},
"publishConfig": {
"access": "public"
Expand Down
3 changes: 3 additions & 0 deletions packages/svelte/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@
"lint": "prettier --cache --check . && eslint .",
"format": "prettier --cache --write ."
},
"peerDependencies": {
"svelte": "^3.29.0"
},
"dependencies": {
"@tolgee/web": "5.2.1"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/vue/jest.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module.exports = {
export default {
preset: 'ts-jest',
testEnvironment: 'jsdom',
unmockedModulePathPatterns: ['/node_modules/*'],
Expand Down
8 changes: 6 additions & 2 deletions packages/vue/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"module": "dist/tolgee-vue.esm.js",
"main": "dist/tolgee-vue.cjs.js",
"types": "lib/index.d.ts",
"type": "module",
"repository": "https://github.com/tolgee/tolgee-js",
"homepage": "https://tolgee.io",
"keywords": [
Expand Down Expand Up @@ -63,8 +64,11 @@
"vue": "^3.0.0"
},
"exports": {
"require": "./dist/tolgee-vue.cjs.js",
"import": "./dist/tolgee-vue.esm.js"
".": {
"require": "./dist/tolgee-vue.cjs.js",
"import": "./dist/tolgee-vue.esm.js"
},
"./package.json": "./package.json"
},
"publishConfig": {
"access": "public"
Expand Down
1 change: 0 additions & 1 deletion packages/web/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ For more information about Tolgee JS integrations, visit the [docs](https://tolg
- [Vue](https://tolgee.io/integrations/vue)
- [Svelte](https://tolgee.io/integrations/svelte)
- [Next.js](https://tolgee.io/integrations/next)
- [Gatsby](https://tolgee.io/integrations/gatsby)
- [More...](https://tolgee.io/integrations/all)
- [Tolgee platform docs](https://tolgee.io/platform)

Expand Down
2 changes: 1 addition & 1 deletion packages/web/jest.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module.exports = {
export default {
preset: 'ts-jest',
testEnvironment: 'jsdom',
transformIgnorePatterns: ['<rootDir>/node_modules/(?!@tolgee)', '^.+\\.js$'],
Expand Down
1 change: 1 addition & 0 deletions packages/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"main": "./dist/tolgee-web.universal.cjs.js",
"module": "./dist/tolgee-web.universal.esm.js",
"types": "./types/index.d.ts",
"type": "module",
"exports": {
".": {
"production": {
Expand Down
Loading

0 comments on commit 05cf4b5

Please sign in to comment.