Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(deps)!: Get all development dependencies up to date #1259

Draft
wants to merge 35 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
5123e1a
fix: Made changes in grammar.pegjs for the strikedown approach (#1256)
Subhojit-Dey1234 Jan 15, 2024
fc5a16b
Remove `bump` tool
tassoevan Jan 8, 2024
47eeaa0
Recommend Node 20
tassoevan Jan 8, 2024
0e19d7e
Spread Volta configuration
tassoevan Jan 8, 2024
4d774e5
Upgrade Babel
tassoevan Jan 8, 2024
b5509d9
Upgrade Changesets
tassoevan Jan 8, 2024
6327fbf
Upgrade Turbo
tassoevan Jan 8, 2024
8524ba4
Upgrade Stylis and `@emotion/hash`
tassoevan Jan 8, 2024
fc0664c
Upgrade linting dependencies
tassoevan Jan 8, 2024
3d1de7a
Remove Lerna
tassoevan Jan 8, 2024
3dd81db
Upgrade TypeScript
tassoevan Jan 8, 2024
bb77798
Fix Stylelint usage
tassoevan Jan 8, 2024
c4a4106
Upgrade Rollup
tassoevan Jan 9, 2024
5646317
Revert extreme Prettier changes
tassoevan Jan 9, 2024
7cc036c
Upgrade Hygen
tassoevan Jan 9, 2024
339eb49
Upgrade `rimraf` and `fast-glob`
tassoevan Jan 9, 2024
1d061bc
Upgrade `zx`
tassoevan Jan 9, 2024
673364e
Upgrade icons related dependencies
tassoevan Jan 9, 2024
d29c3e5
Upgrade Webpack
tassoevan Jan 9, 2024
d4f1b7e
Embed murmur hash into css-in-js
tassoevan Jan 9, 2024
53df364
Dedupe
tassoevan Jan 9, 2024
20c5736
Upgrade Husky
tassoevan Jan 9, 2024
b470791
Fix a bunch of issues
tassoevan Jan 9, 2024
9817217
Upgrade `i18next` and `tldts`
tassoevan Jan 9, 2024
144508e
Fix React version
tassoevan Jan 9, 2024
890bce6
Upgrade React libraries
tassoevan Jan 9, 2024
f9b665c
Upgrade Storybook
tassoevan Jan 9, 2024
b39ece6
Remove unused import
tassoevan Jan 9, 2024
cce68ba
Update workflows
tassoevan Jan 9, 2024
51f701e
Fix lint issues
tassoevan Jan 9, 2024
c43b7f4
Fix some deps
tassoevan Jan 9, 2024
424a944
Fix lint issues in stories
tassoevan Jan 9, 2024
6f0b320
Update workflows
tassoevan Jan 9, 2024
441f0d0
Change Turbo's base branch
tassoevan Jan 9, 2024
d02df0c
Remove wrapping `describe` calls in tests
tassoevan Jan 9, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
22 changes: 11 additions & 11 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,19 @@ jobs:
outputs:
branch-name: ${{ steps.set-branch-name.outputs.branch-name }}
steps:
- uses: actions/setup-node@v2
- uses: actions/setup-node@v4
with:
node-version: "14.21.3"
- uses: actions/checkout@v2
node-version: "20.10.0"
- uses: actions/checkout@v3
- name: Turbo Cache
id: turbo-cache
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: .turbo
key: turbo-${{ runner.os }}-${{ github.job }}
key: turbo-${{ runner.os }}-${{ github.sha }}
restore-keys: |
turbo-${{ runner.os }}-
- uses: actions/cache@v2
- uses: actions/cache@v3
id: yarn-cache
with:
path: |
Expand Down Expand Up @@ -68,15 +68,15 @@ jobs:
needs:
- build-and-test
steps:
- uses: actions/setup-node@v2
- uses: actions/setup-node@v4
with:
node-version: "14.21.3"
node-version: "20.10.0"
registry-url: "https://registry.npmjs.org"
scope: "@rocket.chat"
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/cache@v2
- uses: actions/cache@v3
id: yarn-cache
with:
path: |
Expand Down Expand Up @@ -119,7 +119,7 @@ jobs:
name: github-pages
url: "https://rocketchat.github.io/Rocket.Chat.Fuselage/fuselage/${{ needs.build-and-test.outputs.branch-name }}"
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
ref: gh-pages
- uses: actions/download-artifact@v2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci-pr-closed.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
name: "Delete Storybook for PR #${{ github.event.number }}"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
ref: gh-pages
- run: rm -rf "fuselage/${{ github.event.number }}" "layout/${{ github.event.number }}" "onboarding-ui/${{ github.event.number }}"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci-pr-opened.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ jobs:
name: github-pages
url: "https://rocketchat.github.io/fuselage/fuselage/${{ needs.download-artifact.outputs.pr-number }}"
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
ref: gh-pages
- uses: actions/download-artifact@v2
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/ci-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ jobs:
TURBO_TEAM: ${{ secrets.TURBO_TEAM }}
runs-on: ubuntu-latest
steps:
- uses: actions/setup-node@v2
- uses: actions/setup-node@v4
with:
node-version: "14.21.3"
- uses: actions/checkout@v2
- uses: actions/cache@v2
node-version: "20.10.0"
- uses: actions/checkout@v3
- uses: actions/cache@v3
id: yarn-cache
with:
path: |
Expand All @@ -28,10 +28,10 @@ jobs:
key: ${{ runner.os }}-modules-${{ hashFiles('yarn.lock') }}
- name: Turbo Cache
id: turbo-cache
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: .turbo
key: turbo-${{ runner.os }}-${{ github.job }}
key: turbo-${{ runner.os }}-${{ github.sha }}
restore-keys: |
turbo-${{ runner.os }}-
- run: yarn install
Expand Down
2 changes: 1 addition & 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 All @@ -18,3 +17,4 @@ storybook-static/
**/.storybook/jest-results.json
**/bundle-report.html
.env
migration-storybook.log
2 changes: 1 addition & 1 deletion .lintstagedrc.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"*.{js,mjs,ts,tsx,mdx}": "eslint --fix",
"*.{js,mjs,ts,tsx,mdx},!_templates/*": "eslint --fix",
"*.{css,scss}": "stylelint --fix",
"*.{json,jsonc,md,yml,xml,svg}": "prettier --write"
}
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.

893 changes: 893 additions & 0 deletions .yarn/releases/yarn-4.0.2.cjs

Large diffs are not rendered by default.

16 changes: 5 additions & 11 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,9 @@
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.0.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
3 changes: 3 additions & 0 deletions _templates/create-package/library/files/package.json.t
Original file line number Diff line number Diff line change
Expand Up @@ -66,5 +66,8 @@ to: packages/<%=package%>/package.json
"testMatch": [
"<rootDir>/src/**/*.spec.[jt]s?(x)"
]
},
"volta": {
"extends": "../../package.json"
}
}
4 changes: 1 addition & 3 deletions _templates/create-package/library/prompt.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,10 @@ module.exports = {
message: "What's the package description?",
});

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

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

Expand Down
11 changes: 0 additions & 11 deletions lerna.json

This file was deleted.

38 changes: 18 additions & 20 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,44 +6,42 @@
"tools/*"
],
"devDependencies": {
"@changesets/changelog-github": "~0.4.8",
"@changesets/cli": "~2.26.2",
"bump": "workspace:~",
"husky": "~7.0.4",
"hygen": "~6.1.5",
"lerna": "~4.0.0",
"lint-staged": "~13.2.1",
"turbo": "~1.1.10",
"@changesets/changelog-github": "~0.5.0",
"@changesets/cli": "~2.27.1",
"husky": "~8.0.3",
"hygen": "~6.2.11",
"lint-staged": "~15.2.0",
"turbo": "~1.11.3",
"update-readme": "workspace:~",
"webpack": "~5.78.0"
"webpack": "~5.89.0"
},
"scripts": {
"postinstall": "husky install",
"ci": "yarn turbo run build lint test build-storybook --cache-dir=\".turbo\"",
"clean": "yarn workspaces foreach -v --topological-dev run clean",
"clean": "yarn workspaces foreach -Av --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",
"lint-and-fix": "yarn workspaces foreach -Av --topological-dev run lint-and-fix",
"test": "yarn turbo run test",
"docs": "yarn workspaces foreach -v --topological-dev run docs",
"docs": "yarn workspaces foreach -Av --topological-dev 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",
"create-package": "hygen create-package",
"bump-next": "yarn workspaces foreach --no-private -v run bump-next",
"release": "yarn changeset publish",
"changeset": "changeset",
"release-next": "yarn workspaces foreach --no-private -v npm publish --tag next --tolerate-republish"
"changeset": "changeset"
},
"devEngines": {
"node": "~14.21.3"
"node": "~20.10.0"
},
"volta": {
"node": "14.21.3",
"yarn": "1.22.19"
"node": "20.10.0",
"yarn": "4.0.2"
},
"packageManager": "yarn@3.5.0",
"packageManager": "yarn@4.0.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"
"@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",
"@types/react": "~17.0.74",
"@types/react-dom": "~17.0.25"
}
}
38 changes: 19 additions & 19 deletions packages/css-in-js/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,35 +38,35 @@
"lint-and-fix": "lint-and-fix",
"lint-staged": "lint-staged",
"test": "jest --runInBand",
"docs": "typedoc",
"bump-next": "bump-next"
"docs": "typedoc"
},
"devDependencies": {
"@rocket.chat/eslint-config-alt": "workspace:~",
"@rocket.chat/prettier-config": "workspace:~",
"@rollup/plugin-commonjs": "~21.0.3",
"@rollup/plugin-json": "~4.1.0",
"@rollup/plugin-node-resolve": "~13.1.3",
"@rollup/plugin-typescript": "~8.3.4",
"@types/jest": "~29.5.0",
"@types/stylis": "^4.0.2",
"bump": "workspace:~",
"eslint": "~8.38.0",
"jest": "~29.5.0",
"@rollup/plugin-commonjs": "~25.0.7",
"@rollup/plugin-json": "~6.1.0",
"@rollup/plugin-node-resolve": "~15.2.3",
"@rollup/plugin-typescript": "~11.1.5",
"@types/jest": "~29.5.11",
"@types/stylis": "~4.2.5",
"eslint": "~8.56.0",
"jest": "~29.7.0",
"lint-all": "workspace:~",
"lint-staged": "~13.2.1",
"prettier": "~2.8.7",
"rollup": "~2.67.3",
"lint-staged": "~15.2.0",
"prettier": "~3.1.1",
"rollup": "~4.9.4",
"rollup-plugin-terser": "~7.0.2",
"ts-jest": "~29.1.0",
"typedoc": "~0.24.1",
"typescript": "~5.0.4"
"ts-jest": "~29.1.1",
"typedoc": "~0.25.7",
"typescript": "~5.3.3"
},
"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.1"
},
"volta": {
"extends": "../../package.json"
}
}
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
import path from 'path';
import { basename, dirname } from 'node:path';

import commonjs from '@rollup/plugin-commonjs';
import json from '@rollup/plugin-json';
import nodeResolve from '@rollup/plugin-node-resolve';
import typescript from '@rollup/plugin-typescript';
import { terser } from 'rollup-plugin-terser';

import pkg from './package.json';
import pkg from './package.json' with { type: 'json' };

const globals = {
'@emotion/hash': 'hash',
'@rocket.chat/memo': 'memo',
'@rocket.chat/css-supports': 'cssSupports',
'@rocket.chat/stylis-logical-props-middleware':
Expand Down Expand Up @@ -39,20 +38,20 @@ export default [
input: 'src/index.ts',
output: [
{
dir: path.dirname(pkg.main),
entryFileNames: path.basename(pkg.main),
dir: dirname(pkg.main),
entryFileNames: basename(pkg.main),
format: 'cjs',
sourcemap: true,
},
{
dir: path.dirname(pkg.module),
entryFileNames: path.basename(pkg.module),
dir: dirname(pkg.module),
entryFileNames: basename(pkg.module),
format: 'es',
sourcemap: true,
},
{
dir: path.dirname(pkg.unpkg),
entryFileNames: path.basename(pkg.unpkg),
dir: dirname(pkg.unpkg),
entryFileNames: basename(pkg.unpkg),
format: 'umd',
name: 'cssInJs',
sourcemap: true,
Expand Down
5 changes: 5 additions & 0 deletions packages/css-in-js/src/hash.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import { hash } from './hash';

it('works', () => {
expect(hash('some-string')).toBe('hov4xa');
});
38 changes: 38 additions & 0 deletions packages/css-in-js/src/hash.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
/* eslint-disable no-fallthrough */
// MurmurHash3 32-bit finalizer

export function hash(str: string) {
let h = 0;
let k;
let i = 0;
let len = str.length;
for (; len >= 4; ++i, len -= 4) {
k =
(str.charCodeAt(i) & 0xff) |
((str.charCodeAt(++i) & 0xff) << 8) |
((str.charCodeAt(++i) & 0xff) << 16) |
((str.charCodeAt(++i) & 0xff) << 24);

k = (k & 0xffff) * 0x5bd1e995 + (((k >>> 16) * 0xe995) << 16);
k ^= /* k >>> r: */ k >>> 24;

h =
((k & 0xffff) * 0x5bd1e995 + (((k >>> 16) * 0xe995) << 16)) ^
((h & 0xffff) * 0x5bd1e995 + (((h >>> 16) * 0xe995) << 16));
}

switch (len) {
case 3:
h ^= (str.charCodeAt(i + 2) & 0xff) << 16;
case 2:
h ^= (str.charCodeAt(i + 1) & 0xff) << 8;
case 1:
h ^= str.charCodeAt(i) & 0xff;
h = (h & 0xffff) * 0x5bd1e995 + (((h >>> 16) * 0xe995) << 16);
}

h ^= h >>> 13;
h = (h & 0xffff) * 0x5bd1e995 + (((h >>> 16) * 0xe995) << 16);

return ((h ^ (h >>> 15)) >>> 0).toString(36);
}
2 changes: 1 addition & 1 deletion packages/css-in-js/src/names.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import hash from '@emotion/hash';
import { hash } from './hash';

export const createAnimationName = (content: string): string =>
content ? `rcx-css-${hash(content)}` : 'none';
Expand Down
Loading
Loading