Skip to content

Commit

Permalink
Merge pull request #167 from theodo-group/update-deps
Browse files Browse the repository at this point in the history
update deps
  • Loading branch information
Jeremie-Chauvel authored Dec 19, 2023
2 parents f4c7ee0 + de46617 commit cf366ac
Show file tree
Hide file tree
Showing 15 changed files with 4,070 additions and 3,507 deletions.
14 changes: 5 additions & 9 deletions documentation/docs/technos/next/DecisionRecords/file-exports.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@ TLDR:
2. no index files
3. no paths aliases
4. rely on vscode auto imports
5. (optional) Import order: library services `<br>` project services `<br>` all components
5. (optional) Import order:
- library services
- project services
- all components

## 1. No default exports

Expand All @@ -28,14 +31,7 @@ import { Comp as Component } from './aComponent';

## 2. Index files

Barrel export index.ts files allows for nicer imports:

```tsx
// avoiding:
import { MyComponent } from 'MyComponent/MyComponent.tsx';
// with index.ts exporting MyComponent:
import { MyComponent } from 'MyComponent';
```
Barrel export index.ts files allows for nicer imports but are quite detrimental to tooling performance, avoid using them everywhere.

## 4. Rely on vscode auto imports

Expand Down
2 changes: 1 addition & 1 deletion documentation/docs/technos/next/upgrading-dependencies.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ sidebar_position: 6

`pnpm update --interactive` lets you choose which packages dependencies to upgrade to the latest version based on the range defined in your package.json file

> ^version “Compatible with version”, will update you to all future minor/patch versions, without incrementing the major version e.g. ^2.3.4 will use releases from 2.3.4 to <3.0.0. (more info on this [here](https://stackoverflow.com/a/22345808))
> ^version “Compatible with version”, will update you to all future minor/patch versions, without incrementing the major version e.g. ^2.3.4 will use releases from 2.3.4 to < 3.0.0. ([more info on version management here](https://stackoverflow.com/a/22345808))
`pnpm add {dependency}@latest` to upgrade dependency to the latest version e.g.`pnpm add next@latest`

Expand Down
4 changes: 2 additions & 2 deletions documentation/docusaurus.config.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// @ts-check
// Note: type annotations allow type checking and IDEs autocompletion

const darkCodeTheme = require('prism-react-renderer/themes/dracula');
const lightCodeTheme = require('prism-react-renderer/themes/github');
const { github: lightCodeTheme, dracula: darkCodeTheme } =
require('prism-react-renderer').themes;

/** @type {import('@docusaurus/types').Config} */
const config = {
Expand Down
26 changes: 13 additions & 13 deletions documentation/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,21 +30,21 @@
]
},
"dependencies": {
"@docusaurus/core": "2.2.0",
"@docusaurus/preset-classic": "2.2.0",
"@mdx-js/react": "1.6.22",
"clsx": "1.2.1",
"prettier": "2.7.1",
"prism-react-renderer": "1.3.5",
"react": "17.0.2",
"react-dom": "17.0.2"
"@docusaurus/core": "3.0.1",
"@docusaurus/preset-classic": "3.0.1",
"@mdx-js/react": "3.0.0",
"clsx": "2.0.0",
"prettier": "3.1.1",
"prism-react-renderer": "2.3.1",
"react": "18.2.0",
"react-dom": "18.2.0"
},
"devDependencies": {
"@algolia/client-search": "4.20.0",
"@docusaurus/module-type-aliases": "2.2.0",
"@tsconfig/docusaurus": "1.0.7",
"@types/react": "18.0.25",
"typescript": "5.1.3"
"@algolia/client-search": "4.22.0",
"@docusaurus/module-type-aliases": "3.0.1",
"@tsconfig/docusaurus": "2.0.2",
"@types/react": "18.2.45",
"typescript": "5.3.3"
},
"engines": {
"node": "^20.10.0"
Expand Down
2 changes: 1 addition & 1 deletion examples/bifrost-starter/apps/backend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
"eslint-config-custom": "workspace:*",
"faker": "5.5.3",
"jest": "29.5.0",
"prettier": "2.8.8",
"prettier": "3.1.1",
"supertest": "6.3.3",
"ts-jest": "29.1.1",
"ts-loader": "9.4.4",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ export class UserFactory extends Factory<User> {
password: faker.random.word(),
roles: faker.random.arrayElement([['admin'], []]),
...user,
} as User);
}) as User;
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@ TLDR:
2. no index files
3. no paths aliases
4. rely on vscode auto imports
5. (optional) Import order: library services `<br>` project services `<br>` all components
5. (optional) Import order:
- library services
- project services
- all components

## 1. No default exports

Expand All @@ -22,20 +25,13 @@ import { Comp } from './aComponent';
import { Comp as Component } from './aComponent';
```

- When you have **named exports**, a global search for the `Comp` will ALWAYS tell you 100% of the files that import the component.
- When you have **named exports**, a global search for the `Comp` will ALWAYS tell you 100% of the files that import the component.

- Named exports also play nicer with auto imports
- Named exports also play nicer with auto imports

## 2. Index files

Barrel export index.ts files allows for nicer imports:

```tsx
// avoiding:
import { MyComponent } from 'MyComponent/MyComponent.tsx';
// with index.ts exporting MyComponent:
import { MyComponent } from 'MyComponent';
```
Barrel export index.ts files allows for nicer imports but are quite detrimental to tooling performance, avoid using them everywhere.

## 4. Rely on vscode auto imports

Expand Down
2 changes: 1 addition & 1 deletion examples/bifrost-starter/apps/frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
"jest": "29.5.0",
"jest-axe": "6.0.0",
"jest-environment-jsdom": "29.5.0",
"prettier": "2.8.8",
"prettier": "3.1.1",
"stylelint": "14.11.0",
"stylelint-config-prettier": "9.0.5",
"stylelint-config-standard": "28.0.0",
Expand Down
6 changes: 3 additions & 3 deletions examples/bifrost-starter/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,15 @@
"audit-ci": "6.6.1",
"dependency-cruiser": "15.5.0",
"eslint": "8.43.0",
"eslint-config-prettier": "8.8.0",
"eslint-config-prettier": "9.1.0",
"eslint-import-resolver-typescript": "3.5.5",
"eslint-plugin-import": "2.27.5",
"eslint-plugin-prefer-arrow": "1.2.3",
"eslint-plugin-prettier": "4.2.1",
"eslint-plugin-prettier": "5.0.1",
"husky": "8.0.3",
"lint-staged": "13.2.3",
"npm-audit-resolver": "3.0.0-7",
"prettier": "2.8.8",
"prettier": "3.1.1",
"syncpack": "8.2.4",
"turbo": "1.10.6",
"typescript": "5.1.3"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@
"@typescript-eslint/parser": "5.60.1",
"eslint": "8.43.0",
"eslint-config-next": "14.0.3",
"eslint-config-prettier": "8.8.0",
"eslint-config-prettier": "9.1.0",
"eslint-config-react-app": "7.0.1",
"eslint-plugin-import": "2.27.5",
"eslint-plugin-jest": "27.2.2",
"eslint-plugin-jsx-a11y": "6.7.1",
"eslint-plugin-prettier": "4.2.1",
"eslint-plugin-prettier": "5.0.1",
"eslint-plugin-react-app": "6.2.2",
"eslint-plugin-risxss": "2.1.0",
"eslint-plugin-unused-imports": "2.0.0",
"prettier": "2.8.8"
"prettier": "3.1.1"
}
}
69 changes: 36 additions & 33 deletions examples/bifrost-starter/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"husky": "8.0.3",
"lint-staged": "13.3.0",
"lodash": "4.17.21",
"prettier": "2.8.8",
"prettier": "3.1.1",
"syncpack": "8.2.4",
"turbo": "1.10.15",
"typescript": "4.8.4"
Expand Down
2 changes: 1 addition & 1 deletion packages/create-bifrost-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
"got": "12.6.1",
"node-fetch": "3.3.2",
"picocolors": "1.0.0",
"prettier": "2.7.1",
"prettier": "3.1.1",
"rimraf": "3.0.2",
"tar": "6.2.0",
"ts-node": "10.9.1",
Expand Down
4 changes: 2 additions & 2 deletions packages/eslint-config-custom/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
"@typescript-eslint/eslint-plugin": "5.40.0",
"@typescript-eslint/parser": "5.40.0",
"eslint": "8.25.0",
"eslint-config-prettier": "8.5.0",
"eslint-config-prettier": "9.1.0",
"eslint-plugin-import": "2.26.0",
"eslint-plugin-prefer-arrow": "1.2.3",
"eslint-plugin-prettier": "4.2.1",
"eslint-plugin-prettier": "5.0.1",
"eslint-plugin-unused-imports": "2.0.0"
}
}
Loading

0 comments on commit cf366ac

Please sign in to comment.