Skip to content

Commit

Permalink
chore: Modernize codebase and required tooling (#1385)
Browse files Browse the repository at this point in the history
Co-authored-by: dougfabris <[email protected]>
  • Loading branch information
tassoevan and dougfabris authored Jun 6, 2024
1 parent 07068a8 commit 2bf5b18
Show file tree
Hide file tree
Showing 37 changed files with 10,884 additions and 13,498 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
steps:
- uses: actions/setup-node@v2
with:
node-version: "14.21.3"
node-version: "22.2.0"
- uses: actions/checkout@v2
- name: Turbo Cache
id: turbo-cache
Expand Down Expand Up @@ -70,7 +70,7 @@ jobs:
steps:
- uses: actions/setup-node@v2
with:
node-version: "14.21.3"
node-version: "22.2.0"
registry-url: "https://registry.npmjs.org"
scope: "@rocket.chat"
- uses: actions/checkout@v2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
steps:
- uses: actions/setup-node@v2
with:
node-version: "14.21.3"
node-version: "22.2.0"
- uses: actions/checkout@v2
- uses: actions/cache@v2
id: yarn-cache
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
!/.yarn/sdks
!/.yarn/versions
/.pnp.*
/lerna-debug.log
/static
node_modules/
storybook-static/
Expand Down
1 change: 0 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
"javascriptreact",
"typescript",
"typescriptreact",
"markdown",
"mdx",
"pegjs"
],
Expand Down
363 changes: 0 additions & 363 deletions .yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs

This file was deleted.

9 changes: 0 additions & 9 deletions .yarn/plugins/@yarnpkg/plugin-typescript.cjs

This file was deleted.

550 changes: 0 additions & 550 deletions .yarn/plugins/@yarnpkg/plugin-version.cjs

This file was deleted.

28 changes: 0 additions & 28 deletions .yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs

This file was deleted.

873 changes: 0 additions & 873 deletions .yarn/releases/yarn-3.5.0.cjs

This file was deleted.

894 changes: 894 additions & 0 deletions .yarn/releases/yarn-4.2.2.cjs

Large diffs are not rendered by default.

18 changes: 6 additions & 12 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,9 @@
defaultSemverRangePrefix: ~
compressionLevel: mixed

defaultSemverRangePrefix: "~"

enableGlobalCache: false

nodeLinker: node-modules

plugins:
- path: .yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs
spec: "@yarnpkg/plugin-workspace-tools"
- path: .yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs
spec: "@yarnpkg/plugin-interactive-tools"
- path: .yarn/plugins/@yarnpkg/plugin-version.cjs
spec: "@yarnpkg/plugin-version"
- path: .yarn/plugins/@yarnpkg/plugin-typescript.cjs
spec: "@yarnpkg/plugin-typescript"

yarnPath: .yarn/releases/yarn-3.5.0.cjs
yarnPath: .yarn/releases/yarn-4.2.2.cjs
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2021 Rocket.Chat
Copyright (c) 2024 Rocket.Chat

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
16 changes: 6 additions & 10 deletions _templates/create-package/library/prompt.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
const fs = require("fs");

module.exports = {
prompt: async ({ prompter, args }) => {
const { package } = await prompter.prompt({
prompt: async ({ prompter }) => {
const { package: packageName } = await prompter.prompt({
type: "input",
name: "package",
message: "What's the package name?",
Expand All @@ -14,17 +12,15 @@ module.exports = {
message: "What's the package description?",
});

let { version } = JSON.parse(await fs.promises.readFile("lerna.json"));

({ version } = await prompter.prompt({
const { version } = await prompter.prompt({
type: "input",
name: "version",
default: version,
default: "0.0.1",
message: "What's the package version?",
}));
});

return {
package,
package: packageName,
description,
version,
};
Expand Down
11 changes: 0 additions & 11 deletions lerna.json

This file was deleted.

25 changes: 15 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,25 @@
"@changesets/changelog-github": "~0.4.8",
"@changesets/cli": "~2.26.2",
"bump": "workspace:~",
"husky": "~7.0.4",
"husky": "~9.0.11",
"hygen": "~6.1.5",
"lerna": "~4.0.0",
"lint-staged": "~13.2.1",
"turbo": "~1.1.10",
"pinst": "~3.0.0",
"turbo": "~1.13.3",
"update-readme": "workspace:~",
"webpack": "~5.78.0"
},
"scripts": {
"postinstall": "husky install",
"postinstall": "husky install && yarn build",
"prepack": "pinst --disable",
"postpack": "pinst --enable",
"ci": "yarn turbo run build lint test build-storybook --cache-dir=\".turbo\"",
"clean": "yarn workspaces foreach -v --topological-dev run clean",
"build": "yarn turbo run build",
"lint": "yarn turbo run lint",
"lint-and-fix": "yarn workspaces foreach -v --topological-dev run lint-and-fix",
"test": "yarn turbo run test",
"docs": "yarn workspaces foreach -v --topological-dev run docs",
"docs": "yarn turbo run docs",
"build-storybook": "yarn turbo run build-storybook --cache-dir=\".turbo\"",
"update-readme": "update-readme",
"resolve-workspace-deps": "yarn workspace scripts run resolve-workspace-deps",
Expand All @@ -35,15 +37,18 @@
"changeset": "changeset",
"release-next": "yarn workspaces foreach --no-private -v npm publish --tag next --tolerate-republish"
},
"devEngines": {
"node": "~14.21.3"
"engines": {
"node": "22.2.0"
},
"volta": {
"node": "14.21.3",
"yarn": "1.22.19"
"node": "22.2.0",
"yarn": "4.2.2"
},
"packageManager": "yarn@3.5.0",
"packageManager": "yarn@4.2.2",
"resolutions": {
"@storybook/react-docgen-typescript-plugin@1.0.2-canary.6.9d540b91e815f8fc2f8829189deb00553559ff63.0": "patch:@storybook/react-docgen-typescript-plugin@npm%3A1.0.2-canary.6.9d540b91e815f8fc2f8829189deb00553559ff63.0#./.yarn/patches/@storybook-react-docgen-typescript-plugin-npm-1.0.2-canary.6.9d540b91e815f8fc2f8829189deb00553559ff63.0-b31cc57c40.patch"
},
"eslintConfig": {
"extends": "@rocket.chat/eslint-config-alt"
}
}
6 changes: 3 additions & 3 deletions packages/css-in-js/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,14 +59,14 @@
"rollup": "~2.67.3",
"rollup-plugin-terser": "~7.0.2",
"ts-jest": "~29.1.0",
"typedoc": "~0.24.1",
"typescript": "~5.0.4"
"typedoc": "~0.25.13",
"typescript": "~5.4.5"
},
"dependencies": {
"@emotion/hash": "^0.9.0",
"@rocket.chat/css-supports": "workspace:~",
"@rocket.chat/memo": "workspace:~",
"@rocket.chat/stylis-logical-props-middleware": "workspace:~",
"stylis": "~4.1.3"
"stylis": "~4.3.2"
}
}
4 changes: 2 additions & 2 deletions packages/css-supports/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@
"lint-staged": "~13.2.1",
"prettier": "~2.8.7",
"rimraf": "~3.0.2",
"typedoc": "~0.24.1",
"typescript": "~5.0.4"
"typedoc": "~0.25.13",
"typescript": "~5.4.5"
},
"dependencies": {
"@rocket.chat/memo": "workspace:~"
Expand Down
4 changes: 2 additions & 2 deletions packages/emitter/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
"rollup": "~2.67.3",
"rollup-plugin-terser": "~7.0.2",
"ts-jest": "~29.1.0",
"typedoc": "~0.24.1",
"typescript": "~5.0.4"
"typedoc": "~0.25.13",
"typescript": "~5.4.5"
}
}
4 changes: 2 additions & 2 deletions packages/fuselage-hooks/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@
"rollup-plugin-terser": "~7.0.2",
"testing-utils": "workspace:~",
"ts-jest": "~29.1.0",
"typedoc": "~0.24.1",
"typescript": "~5.0.4"
"typedoc": "~0.25.13",
"typescript": "~5.4.5"
},
"peerDependencies": {
"@rocket.chat/fuselage-tokens": "*",
Expand Down
4 changes: 2 additions & 2 deletions packages/fuselage-toastbar/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@
"rimraf": "~3.0.2",
"storybook-dark-mode": "~1.1.2",
"ts-jest": "~29.1.0",
"typedoc": "~0.24.1",
"typescript": "~5.0.4"
"typedoc": "~0.25.13",
"typescript": "~5.4.5"
},
"peerDependencies": {
"@rocket.chat/fuselage": "*",
Expand Down
2 changes: 1 addition & 1 deletion packages/fuselage/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@
"testing-utils": "workspace:~",
"ts-jest": "~29.1.0",
"ts-loader": "~9.4.2",
"typescript": "~5.0.4",
"typescript": "~5.4.5",
"webpack": "~5.78.0",
"webpack-bundle-analyzer": "~4.8.0",
"webpack-cli": "~5.0.1",
Expand Down
4 changes: 2 additions & 2 deletions packages/layout/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@
"rimraf": "~3.0.2",
"storybook-dark-mode": "~3.0.1",
"ts-jest": "~29.1.0",
"typedoc": "~0.24.1",
"typescript": "~5.0.4"
"typedoc": "~0.25.13",
"typescript": "~5.4.5"
},
"eslintConfig": {
"extends": "@rocket.chat/eslint-config-alt/typescript",
Expand Down
4 changes: 2 additions & 2 deletions packages/logo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@
"react-dom": "^17.0.2",
"rimraf": "^3.0.2",
"ts-jest": "~29.1.0",
"typedoc": "~0.24.1",
"typescript": "~5.0.4"
"typedoc": "~0.25.13",
"typescript": "~5.4.5"
},
"dependencies": {
"@rocket.chat/fuselage-hooks": "workspace:~",
Expand Down
4 changes: 2 additions & 2 deletions packages/memo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@
"prettier": "~2.8.7",
"rimraf": "~3.0.2",
"ts-jest": "~29.1.0",
"typedoc": "~0.24.1",
"typescript": "~5.0.4"
"typedoc": "~0.25.13",
"typescript": "~5.4.5"
},
"eslintConfig": {
"extends": "@rocket.chat/eslint-config-alt/typescript",
Expand Down
4 changes: 2 additions & 2 deletions packages/mp3-encoder/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
"prettier": "~2.8.7",
"rollup": "~3.20.4",
"ts-jest": "~29.1.0",
"typedoc": "~0.24.1",
"typescript": "~5.0.4"
"typedoc": "~0.25.13",
"typescript": "~5.4.5"
}
}
4 changes: 2 additions & 2 deletions packages/onboarding-ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@
"rimraf": "^3.0.2",
"storybook-dark-mode": "^1.1.2",
"ts-jest": "~29.1.0",
"typedoc": "~0.24.1",
"typescript": "~5.0.4"
"typedoc": "~0.25.13",
"typescript": "~5.4.5"
},
"dependencies": {
"i18next": "~21.6.16",
Expand Down
2 changes: 1 addition & 1 deletion packages/peggy-loader/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
"prettier": "~2.8.7",
"rimraf": "^3.0.2",
"ts-jest": "~29.1.0",
"typescript": "~5.0.4",
"typescript": "~5.4.5",
"webpack": "~5.78.0"
}
}
4 changes: 2 additions & 2 deletions packages/string-helpers/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@
"prettier": "~2.8.7",
"rimraf": "^3.0.2",
"ts-jest": "~29.1.0",
"typedoc": "~0.24.1",
"typescript": "~5.0.4"
"typedoc": "~0.25.13",
"typescript": "~5.4.5"
},
"eslintConfig": {
"extends": "@rocket.chat/eslint-config-alt/typescript",
Expand Down
4 changes: 2 additions & 2 deletions packages/styled/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@
"prettier": "~2.8.7",
"rimraf": "^3.0.2",
"ts-jest": "~29.1.0",
"typedoc": "~0.24.1",
"typescript": "~5.0.4"
"typedoc": "~0.25.13",
"typescript": "~5.4.5"
},
"dependencies": {
"@rocket.chat/css-in-js": "workspace:~"
Expand Down
8 changes: 4 additions & 4 deletions packages/stylis-logical-props-middleware/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,15 +49,15 @@
"npm-run-all": "^4.1.5",
"prettier": "~2.8.7",
"rimraf": "^3.0.2",
"stylis": "4.1.3",
"stylis": "~4.3.2",
"ts-jest": "~29.1.0",
"typedoc": "~0.24.1",
"typescript": "~5.0.4"
"typedoc": "~0.25.13",
"typescript": "~5.4.5"
},
"dependencies": {
"@rocket.chat/css-supports": "workspace:~"
},
"peerDependencies": {
"stylis": "4.0.10"
"stylis": "~4.3.2"
}
}
4 changes: 0 additions & 4 deletions tools/bump/bump.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,6 @@ await standardVersion({
filename: './package.json',
type: 'json',
},
{
filename: './lerna.json',
type: 'json',
},
...(
await glob(workspaces.map((workspace) => `${workspace}/package.json`))
).map((filename) => ({
Expand Down
2 changes: 1 addition & 1 deletion tools/scripts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"npm-run-all": "^4.1.5",
"prettier": "~2.8.7",
"ts-node": "~10.9.1",
"typescript": "~5.0.4"
"typescript": "~5.4.5"
},
"version": "0.31.25"
}
12 changes: 0 additions & 12 deletions tools/write-version-module/CHANGELOG.md

This file was deleted.

11 changes: 0 additions & 11 deletions tools/write-version-module/index.mjs

This file was deleted.

6 changes: 0 additions & 6 deletions tools/write-version-module/package.json

This file was deleted.

Loading

0 comments on commit 2bf5b18

Please sign in to comment.