Skip to content

Commit

Permalink
(chore) Bump dependencies (#22)
Browse files Browse the repository at this point in the history
  • Loading branch information
denniskigen authored Sep 7, 2023
1 parent bece0cf commit 363dafc
Show file tree
Hide file tree
Showing 17 changed files with 1,566 additions and 538 deletions.
15 changes: 7 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,10 @@ on:
jobs:
build:
runs-on: ubuntu-latest
permissions:
actions: read
env:
TURBO_API: 'http://127.0.0.1:9080'
TURBO_TOKEN: ${{ secrets.TURBO_SERVER_TOKEN }}
TURBO_TEAM: ${{ github.repository_owner }}

steps:
- uses: actions/checkout@v3
Expand All @@ -39,14 +41,11 @@ jobs:
repo-token: ${{ secrets.GITHUB_TOKEN }}
server-token: ${{ secrets.TURBO_SERVER_TOKEN }}

- name: Run lint and typecheck
run: yarn turbo run lint typescript --color --api="http://127.0.0.1:9080" --token="${{ secrets.TURBO_SERVER_TOKEN }}" --team="${{ github.repository_owner }}"

- name: Run tests
run: yarn run test
- name: Run lint, typecheck and tests
run: yarn verify

- name: Run build
run: yarn turbo run build --color --concurrency=5 --api="http://127.0.0.1:9080" --token="${{ secrets.TURBO_SERVER_TOKEN }}" --team="${{ github.repository_owner }}"
run: yarn turbo run build --color --concurrency=5

- name: Upload build artifacts
uses: actions/upload-artifact@v2
Expand Down
3 changes: 2 additions & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@

set -e # die on error

yarn run extract-translations
yarn prettier
yarn run extract-translations
5 changes: 1 addition & 4 deletions .husky/pre-push
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,4 @@

set -e # die on error

npx pretty-quick --staged
npx lerna run lint
yarn test
npx lerna run typescript
yarn verify
541 changes: 541 additions & 0 deletions .yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs

Large diffs are not rendered by default.

403 changes: 202 additions & 201 deletions .yarn/releases/yarn-3.5.1.cjs → .yarn/releases/yarn-3.6.0.cjs

Large diffs are not rendered by default.

6 changes: 5 additions & 1 deletion .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
nodeLinker: node-modules

yarnPath: .yarn/releases/yarn-3.5.1.cjs
plugins:
- path: .yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs
spec: "@yarnpkg/plugin-interactive-tools"

yarnPath: .yarn/releases/yarn-3.6.0.cjs
13 changes: 9 additions & 4 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
const path = require('path');

/** @type {import('jest').Config} */
module.exports = {
transform: {
'^.+\\.(m?j|t)sx?$': ['@swc/jest'],
'^.+\\.(j|t)sx?$': '@swc/jest',
},
transformIgnorePatterns: ['/node_modules/(?!@openmrs|dexie)'],
transformIgnorePatterns: ['/node_modules/(?!@openmrs)'],
moduleNameMapper: {
'\\.(s?css)$': 'identity-obj-proxy',
'@openmrs/esm-framework': '@openmrs/esm-framework/mock',
'^dexie$': require.resolve('dexie'),
'^lodash-es/(.*)$': 'lodash/$1',
'^react-i18next$': path.resolve(__dirname, '__mocks__', 'react-i18next.js'),
},
collectCoverageFrom: [
'**/src/**/*.component.tsx',
Expand All @@ -24,10 +29,10 @@ module.exports = {
lines: 80,
},
},
setupFilesAfterEnv: ['<rootDir>/tools/setupTests.ts'],
setupFilesAfterEnv: [path.resolve(__dirname, 'tools', 'setupTests.ts')],
testEnvironment: 'jsdom',
testEnvironmentOptions: {
url: 'http://localhost/',
},
testPathIgnorePatterns: ['<rootDir>/e2e'],
testPathIgnorePatterns: [path.resolve(__dirname, 'e2e')],
};
83 changes: 41 additions & 42 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,63 +10,62 @@
"ci:publish": "lerna publish from-package --yes",
"ci:prepublish": "lerna publish from-package --no-git-reset --yes --dist-tag next",
"release": "lerna version --no-git-tag-version",
"verify": "turbo run lint && turbo run typescript && yarn run test",
"verify": "turbo lint typescript test",
"prettier": "prettier --config prettier.config.js --write \"packages/**/*.{ts,tsx}\" \"e2e/**/*.ts\"",
"postinstall": "husky install",
"test": "TZ=UTC jest --verbose false --passWithNoTests",
"test-watch": "TZ=UTC jest --watch --config jest.config.json",
"test-e2e": "playwright test",
"coverage": "yarn test --coverage",
"extract-translations": "lerna run extract-translations"
},
"devDependencies": {
"@openmrs/esm-framework": "next",
"@playwright/test": "^1.32.3",
"@swc/cli": "^0.1.57",
"@swc/core": "^1.2.205",
"@swc/jest": "^0.2.21",
"@testing-library/dom": "^8.13.0",
"@testing-library/jest-dom": "^5.16.4",
"@testing-library/react": "^13.2.0",
"@testing-library/user-event": "^14.2.0",
"@openmrs/esm-framework": "^5.1.0",
"@playwright/test": "^1.37.1",
"@swc/cli": "^0.1.62",
"@swc/core": "^1.3.83",
"@swc/jest": "^0.2.29",
"@testing-library/dom": "^8.20.1",
"@testing-library/jest-dom": "^5.17.0",
"@testing-library/react": "^13.4.0",
"@testing-library/user-event": "^14.4.3",
"@types/jest": "^25.2.3",
"@types/jsdom": "20.0.0",
"@types/lodash-es": "^4.17.3",
"@types/react": "^18.0.9",
"@types/react-dom": "^18.0.5",
"@types/webpack-env": "^1.16.0",
"@typescript-eslint/eslint-plugin": "^4.15.1",
"@typescript-eslint/parser": "^4.15.1",
"@types/jsdom": "20.0.1",
"@types/lodash-es": "^4.17.9",
"@types/react": "^18.2.21",
"@types/react-dom": "^18.2.7",
"@types/webpack-env": "^1.18.1",
"@typescript-eslint/eslint-plugin": "^4.33.0",
"@typescript-eslint/parser": "^4.33.0",
"concurrently": "^6.5.1",
"css-loader": "^6.7.3",
"dayjs": "^1.10.7",
"dotenv": "^16.0.3",
"eslint": "^7.20.0",
"eslint-config-prettier": "^8.2.0",
"cross-env": "^7.0.3",
"css-loader": "^6.8.1",
"dayjs": "^1.11.9",
"dotenv": "^16.3.1",
"eslint": "^7.32.0",
"eslint-config-prettier": "^8.10.0",
"eslint-config-ts-react-important-stuff": "^3.0.0",
"eslint-plugin-prettier": "^3.3.1",
"husky": "^8.0.1",
"i18next": "^19.7.0",
"eslint-plugin-prettier": "^3.4.1",
"husky": "^8.0.3",
"i18next": "^19.9.2",
"i18next-parser": "^3.11.0",
"identity-obj-proxy": "^3.0.0",
"jest": "^28.1.0",
"jest-cli": "^28.1.0",
"jest-environment-jsdom": "^28.1.0",
"jest": "^28.1.3",
"jest-cli": "^28.1.3",
"jest-environment-jsdom": "^28.1.3",
"lerna": "^4.0.0",
"openmrs": "next",
"prettier": "^2.4.1",
"prettier": "^2.8.8",
"pretty-quick": "^2.0.2",
"react": "^18.1.0",
"react-dom": "^18.1.0",
"react-i18next": "^11.18.3",
"react-router-dom": "^6.3.0",
"rxjs": "^6.6.3",
"sass": "^1.29.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-i18next": "^11.18.6",
"react-router-dom": "^6.15.0",
"rxjs": "^6.6.7",
"sass": "^1.66.1",
"swc-loader": "^0.2.3",
"turbo": "^1.4.3",
"typescript": "^4.0.3",
"webpack": "^5.36.2",
"webpack-cli": "^4.7.0"
"turbo": "^1.10.13",
"typescript": "^4.9.5",
"webpack": "^5.88.2",
"webpack-cli": "^4.10.0"
},
"packageManager": "yarn@3.5.1"
"packageManager": "yarn@3.6.0"
}
3 changes: 3 additions & 0 deletions packages/esm-admin-openconceptlab-app/jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
const rootConfig = require('../../jest.config.js');

module.exports = rootConfig;
8 changes: 5 additions & 3 deletions packages/esm-admin-openconceptlab-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
"build": "webpack --mode production",
"analyze": "webpack --mode=production --env.analyze=true",
"lint": "eslint src --ext js,jsx,ts,tsx",
"test": "cross-env TZ=UTC jest --config jest.config.js --verbose false --passWithNoTests --color",
"test:watch": "cross-env TZ=UTC jest --watch --config jest.config.js --color",
"typescript": "tsc",
"extract-translations": "i18next 'src/**/*.component.tsx' --config ../../tools/i18next-parser.config.js"
},
Expand All @@ -36,9 +38,9 @@
"url": "https://github.com/openmrs/openmrs-esm-admin-tools/issues"
},
"dependencies": {
"@carbon/react": "^1.8.0",
"lodash-es": "^4.17.15",
"swr": "^2.0.0"
"@carbon/react": "^1.37.0",
"lodash-es": "^4.17.21",
"swr": "^2.2.2"
},
"peerDependencies": {
"@openmrs/esm-framework": "4.x",
Expand Down
1 change: 0 additions & 1 deletion packages/esm-admin-openconceptlab-app/src/setup-tests.ts

This file was deleted.

3 changes: 3 additions & 0 deletions packages/esm-system-admin-app/jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
const rootConfig = require('../../jest.config.js');

module.exports = rootConfig;
8 changes: 5 additions & 3 deletions packages/esm-system-admin-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
"analyze": "webpack --mode=production --env.analyze=true",
"lint": "eslint src --ext js,jsx,ts,tsx",
"typescript": "tsc",
"test": "cross-env TZ=UTC jest --config jest.config.js --verbose false --passWithNoTests --color",
"test:watch": "cross-env TZ=UTC jest --watch --config jest.config.js --color",
"extract-translations": "i18next 'src/**/*.component.tsx' --config ../../tools/i18next-parser.config.js"
},
"browserslist": [
Expand All @@ -34,9 +36,9 @@
"url": "https://github.com/openmrs/openmrs-esm-admin-tools/issues"
},
"dependencies": {
"@carbon/react": "^1.8.0",
"lodash-es": "^4.17.15",
"swr": "^2.0.0"
"@carbon/react": "^1.37.0",
"lodash-es": "^4.17.21",
"swr": "^2.2.2"
},
"peerDependencies": {
"@openmrs/esm-framework": "4.x",
Expand Down
4 changes: 0 additions & 4 deletions packages/esm-system-admin-app/src/setup-tests.tsx

This file was deleted.

29 changes: 10 additions & 19 deletions tools/setupTests.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import '@testing-library/jest-dom';
import '@testing-library/jest-dom/extend-expect';

declare global {
interface Window {
Expand All @@ -7,24 +7,15 @@ declare global {
}
}

import i18n from 'i18next';
import { initReactI18next } from 'react-i18next';

i18n.use(initReactI18next).init({
lng: 'en',
fallbackLng: 'en',

// have a common namespace used around the full app
ns: ['translations'],
defaultNS: 'translations',

// debug: true,

interpolation: {
escapeValue: false, // not needed for react!!
},

resources: { en: { translations: {} } },
Object.defineProperty(window, 'matchMedia', {
writable: true,
value: jest.fn().mockImplementation((query) => ({
matches: false, // Set the desired value (true or false) based on your test case
media: query,
onchange: null,
addEventListener: jest.fn(),
removeEventListener: jest.fn(),
})),
});

window.openmrsBase = '/openmrs';
Expand Down
20 changes: 4 additions & 16 deletions turbo.json
Original file line number Diff line number Diff line change
@@ -1,26 +1,14 @@
{
"$schema": "https://turborepo.org/schema.json",
"baseBranch": "origin/main",
"pipeline": {
"build": {
"dependsOn": ["^build"],
"outputs": ["dist/**"]
},
"test": {
"dependsOn": [],
"outputs": []
},
"lint": {
"dependsOn": ["^lint"],
"outputs": []
},
"typescript": {
"dependsOn": ["^typescript"],
"outputs": []
},
"extract-translations": {
"outputs": []
},
"test": {},
"lint": {},
"typescript": {},
"extract-translations": {},
"dev": {
"cache": false
}
Expand Down
Loading

0 comments on commit 363dafc

Please sign in to comment.