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

[DEMO] use React 18 in demo-app, fix ContextMenu positioning #6702

Closed
wants to merge 28 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
eb8c679
[docs] feat: add strict mode toggle
adidahiya Feb 6, 2024
d6205c3
minor refactor
adidahiya Feb 6, 2024
6bbcf4b
WIP attempt to use React 18 in demo-app
adidahiya Feb 6, 2024
aff819b
WIP migrate to Yarn PnP
adidahiya Feb 6, 2024
1a8d46d
WIP stop hoisting dependencies
adidahiya Feb 6, 2024
85d0b85
un-hoist more deps, use yarn 4.1
adidahiya Feb 7, 2024
cc47be7
fix some constraints
adidahiya Feb 7, 2024
89bfbc8
update CI caching config
adidahiya Feb 7, 2024
08e45f9
remove node_modules persistence in CI
adidahiya Feb 7, 2024
17faf26
yarn install in CI steps
adidahiya Feb 7, 2024
2cbae0f
add @types/node to root
adidahiya Feb 7, 2024
bb2ed7c
update/simplify tsconfig 'lib' settings
adidahiya Feb 7, 2024
a2c5791
remove references to node_modules
adidahiya Feb 7, 2024
149036a
create custom file importer to support Yarn PnP
adidahiya Feb 7, 2024
849016c
Pin to React 18 types
adidahiya Feb 7, 2024
3223fd9
Fix compile errors with React 18 types
adidahiya Feb 7, 2024
5ad5d28
skip datetime lib check
adidahiya Feb 7, 2024
c6426c7
fix more implicit hoisting issues
adidahiya Feb 7, 2024
3d4bea3
fix Icon component interface
adidahiya Feb 8, 2024
6b5bc0d
fix sass-loader importer
adidahiya Feb 8, 2024
ab558e5
REVERT ME: remove datetime dependency from demo-app
adidahiya Feb 8, 2024
bcfd331
fix react 18 type errors in table package
adidahiya Feb 8, 2024
75980a6
WIP fix ContextMenu in React 18
adidahiya Feb 13, 2024
5ef49c3
PopoverOverlay
adidahiya Feb 21, 2024
f97f74d
WIP fix core tests
adidahiya Feb 21, 2024
d90db9c
apply various commits from develop
adidahiya Feb 28, 2024
fddc373
apply changes from #6720
adidahiya Feb 28, 2024
5d449aa
commit vscode settings for Yarn PnP
adidahiya Feb 28, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 28 additions & 34 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,48 +12,34 @@ aliases:
environment:
CHROME_BIN: "/usr/bin/google-chrome"

- &restore-node-modules-cache
name: Restore node_modules cache
key: v1-node-modules-{{ checksum "yarn.lock" }}

- &restore-yarn-cache
name: Restore Yarn global cache
key: v1-yarn-global

- &save-node-modules-cache
name: Save node_modules cache
paths:
- node_modules
key: v1-node-modules-{{ checksum "yarn.lock" }}
name: Restore Yarn cache
key: yarn-packages-{{ checksum "yarn.lock" }}

- &save-yarn-cache
name: Save Yarn global cache
name: Save Yarn cache
paths:
# see https://yarnpkg.com/configuration/yarnrc#globalFolder
- /.yarn/berry/global
key: v1-yarn-global
- ~/.yarn/berry/cache
- .yarn/cache
- .yarn/unplugged
key: yarn-packages-{{ checksum "yarn.lock" }}

jobs:
checkout-code:
docker: *docker-node-image
steps:
- checkout
- restore_cache: *restore-yarn-cache
- restore_cache: *restore-node-modules-cache
- run: sudo corepack enable
- run: yarn install --immutable
- run: yarn constraints
- save_cache: *save-node-modules-cache
- save_cache: *save-yarn-cache
- persist_to_workspace:
root: "."
paths: [packages/*/node_modules]

clean-lockfile:
docker: *docker-node-image
steps:
- checkout
- restore_cache: *restore-node-modules-cache
- restore_cache: *restore-yarn-cache
- run: sudo corepack enable
- run: yarn dedupe --check

Expand All @@ -62,9 +48,9 @@ jobs:
resource_class: xlarge
steps:
- checkout
- restore_cache: *restore-node-modules-cache
- attach_workspace: { at: "." }
- restore_cache: *restore-yarn-cache
- run: sudo corepack enable
- run: yarn install --immutable
- run: yarn compile --parallel=7
- persist_to_workspace:
root: "."
Expand All @@ -79,9 +65,9 @@ jobs:
NODE_ENV: test
steps:
- checkout
- restore_cache: *restore-node-modules-cache
- attach_workspace: { at: "." }
- restore_cache: *restore-yarn-cache
- run: sudo corepack enable
- run: yarn install --immutable
- run: yarn format-check

lint:
Expand All @@ -92,9 +78,10 @@ jobs:
NODE_ENV: test
steps:
- checkout
- restore_cache: *restore-node-modules-cache
- restore_cache: *restore-yarn-cache
- attach_workspace: { at: "." }
- run: sudo corepack enable
- run: yarn install --immutable
- run: mkdir -p ./reports/eslint ./reports/stylelint
# types and lint rules should already be compiled since this job depends on the 'compile' job
- run: yarn lint
Expand All @@ -108,9 +95,10 @@ jobs:
NODE_ENV: test
steps:
- checkout
- restore_cache: *restore-node-modules-cache
- restore_cache: *restore-yarn-cache
- attach_workspace: { at: "." }
- run: sudo corepack enable
- run: yarn install --immutable
- run: yarn dist --parallel=7
- persist_to_workspace:
root: "."
Expand All @@ -123,9 +111,10 @@ jobs:
parallelism: 2
steps:
- checkout
- restore_cache: *restore-node-modules-cache
- restore_cache: *restore-yarn-cache
- attach_workspace: { at: "." }
- run: sudo corepack enable
- run: yarn install --immutable
- run: mkdir -p ./reports
- run:
command: |
Expand All @@ -137,17 +126,18 @@ jobs:
- store_test_results: { path: ./reports }
- store_artifacts: { path: ./reports }

test-react-16: &test-react
test-react-16:
docker: *docker-node-browsers-image
resource_class: xlarge
environment:
JUNIT_REPORT_PATH: reports
parallelism: 6
steps:
- checkout
- restore_cache: *restore-node-modules-cache
- restore_cache: *restore-yarn-cache
- attach_workspace: { at: "." }
- run: sudo corepack enable
- run: yarn install --immutable
# HACKHACK: pin Chrome version to work around bug in v115
# see https://github.com/CircleCI-Public/browser-tools-orb/issues/75
- run: sudo apt-get update
Expand Down Expand Up @@ -184,9 +174,10 @@ jobs:
JUNIT_REPORT_PATH: reports
steps:
- checkout
- restore_cache: *restore-node-modules-cache
- restore_cache: *restore-yarn-cache
- attach_workspace: { at: "." }
- run: sudo corepack enable
- run: yarn install --immutable
- run: mkdir ./reports
- run: yarn nx run-many -t test:iso
- store_test_results: { path: ./reports }
Expand All @@ -196,8 +187,10 @@ jobs:
docker: *docker-node-image
steps:
- checkout
- restore_cache: *restore-node-modules-cache
- restore_cache: *restore-yarn-cache
- attach_workspace: { at: "." }
- run: sudo corepack enable
- run: yarn install --immutable
- store_artifacts: { path: packages/docs-app/dist }
- store_artifacts: { path: packages/landing-app/dist }
- store_artifacts: { path: packages/table-dev-app/dist }
Expand All @@ -208,9 +201,10 @@ jobs:
docker: *docker-node-image
steps:
- checkout
- restore_cache: *restore-node-modules-cache
- restore_cache: *restore-yarn-cache
- attach_workspace: { at: "." }
- run: sudo corepack enable
- run: yarn install --immutable
- run: ./scripts/publish-npm-semver-tagged

workflows:
Expand Down
2 changes: 1 addition & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,5 +75,5 @@ module.exports = {
},
},
],
ignorePatterns: ["node_modules", "dist", "lib", "fixtures", "coverage", "__snapshots__", "generated"],
ignorePatterns: ["dist", "lib", "fixtures", "coverage", "__snapshots__", "generated"],
};
1 change: 0 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
node_modules/
generated/
lib/
dist/
Expand Down
1 change: 0 additions & 1 deletion .stylelintignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
.sass-cache
node_modules
build
dist
/docs
Expand Down
22 changes: 12 additions & 10 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
{
// See http://go.microsoft.com/fwlink/?LinkId=827846
// for the documentation about the extensions.json format
"recommendations": [
// for a beautiful editing experience:
"giladgray.theme-blueprint",
// for consistent editor settings:
"EditorConfig.EditorConfig",
// for TS and JS:
"dbaeumer.vscode-eslint"
]
// See http://go.microsoft.com/fwlink/?LinkId=827846
// for the documentation about the extensions.json format
"recommendations": [
// for a beautiful editing experience:
"giladgray.theme-blueprint",
// for consistent editor settings:
"EditorConfig.EditorConfig",
// for TS and JS:
"dbaeumer.vscode-eslint",
"arcanis.vscode-zipfs",
"esbenp.prettier-vscode"
]
}
66 changes: 35 additions & 31 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,33 +1,37 @@
{
"typescript.tsdk": "./node_modules/typescript/lib",
"files.watcherExclude": {
"**/build": true,
"**/coverage": true,
"**/dist": true,
"docs": true
},
"search.exclude": {
"**/build": true,
"**/coverage": true,
"**/dist": true,
"**/lib": true,
"**/node_modules": true,
"docs": true,
"site/docs": true,
"packages/docs-data/src/generated": true
},
"editor.insertSpaces": true,
"editor.tabSize": 4,
"editor.codeActionsOnSave": {
"source.fixAll": "explicit"
},
"[scss]": {
"editor.tabSize": 2
},
"eslint.format.enable": false,
"eslint.workingDirectories": [
{
"pattern": "./packages/*"
}
]
"typescript.tsdk": ".yarn/sdks/typescript/lib",
"files.watcherExclude": {
"**/build": true,
"**/coverage": true,
"**/dist": true,
"docs": true
},
"search.exclude": {
"**/build": true,
"**/coverage": true,
"**/dist": true,
"**/lib": true,
"docs": true,
"site/docs": true,
"packages/docs-data/src/generated": true,
"**/.yarn": true,
"**/.pnp.*": true
},
"editor.insertSpaces": true,
"editor.tabSize": 4,
"editor.codeActionsOnSave": {
"source.fixAll": "explicit"
},
"[scss]": {
"editor.tabSize": 2
},
"eslint.format.enable": false,
"eslint.workingDirectories": [
{
"pattern": "./packages/*"
}
],
"eslint.nodePath": ".yarn/sdks",
"prettier.prettierPath": ".yarn/sdks/prettier/index.cjs",
"typescript.enablePromptUseWorkspaceTsdk": true
}
20 changes: 20 additions & 0 deletions .yarn/sdks/eslint/bin/eslint.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/usr/bin/env node

const {existsSync} = require(`fs`);
const {createRequire} = require(`module`);
const {resolve} = require(`path`);

const relPnpApiPath = "../../../../.pnp.cjs";

const absPnpApiPath = resolve(__dirname, relPnpApiPath);
const absRequire = createRequire(absPnpApiPath);

if (existsSync(absPnpApiPath)) {
if (!process.versions.pnp) {
// Setup the environment to be able to require eslint/bin/eslint.js
require(absPnpApiPath).setup();
}
}

// Defer to the real eslint/bin/eslint.js your application uses
module.exports = absRequire(`eslint/bin/eslint.js`);
14 changes: 14 additions & 0 deletions .yarn/sdks/eslint/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"name": "eslint",
"version": "8.56.0-sdk",
"main": "./lib/api.js",
"type": "commonjs",
"bin": {
"eslint": "./bin/eslint.js"
},
"exports": {
"./package.json": "./package.json",
".": "./lib/api.js",
"./use-at-your-own-risk": "./lib/unsupported-api.js"
}
}
6 changes: 6 additions & 0 deletions .yarn/sdks/integrations.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# This file is automatically generated by @yarnpkg/sdks.
# Manual changes might be lost!

integrations:
- vscode
- vim
20 changes: 20 additions & 0 deletions .yarn/sdks/prettier/bin/prettier.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/usr/bin/env node

const {existsSync} = require(`fs`);
const {createRequire} = require(`module`);
const {resolve} = require(`path`);

const relPnpApiPath = "../../../../.pnp.cjs";

const absPnpApiPath = resolve(__dirname, relPnpApiPath);
const absRequire = createRequire(absPnpApiPath);

if (existsSync(absPnpApiPath)) {
if (!process.versions.pnp) {
// Setup the environment to be able to require prettier/bin/prettier.cjs
require(absPnpApiPath).setup();
}
}

// Defer to the real prettier/bin/prettier.cjs your application uses
module.exports = absRequire(`prettier/bin/prettier.cjs`);
20 changes: 20 additions & 0 deletions .yarn/sdks/prettier/index.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/usr/bin/env node

const {existsSync} = require(`fs`);
const {createRequire} = require(`module`);
const {resolve} = require(`path`);

const relPnpApiPath = "../../../.pnp.cjs";

const absPnpApiPath = resolve(__dirname, relPnpApiPath);
const absRequire = createRequire(absPnpApiPath);

if (existsSync(absPnpApiPath)) {
if (!process.versions.pnp) {
// Setup the environment to be able to require prettier
require(absPnpApiPath).setup();
}
}

// Defer to the real prettier your application uses
module.exports = absRequire(`prettier`);
7 changes: 7 additions & 0 deletions .yarn/sdks/prettier/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"name": "prettier",
"version": "3.2.5-sdk",
"main": "./index.cjs",
"type": "commonjs",
"bin": "./bin/prettier.cjs"
}
20 changes: 20 additions & 0 deletions .yarn/sdks/typescript/bin/tsc
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/usr/bin/env node

const {existsSync} = require(`fs`);
const {createRequire} = require(`module`);
const {resolve} = require(`path`);

const relPnpApiPath = "../../../../.pnp.cjs";

const absPnpApiPath = resolve(__dirname, relPnpApiPath);
const absRequire = createRequire(absPnpApiPath);

if (existsSync(absPnpApiPath)) {
if (!process.versions.pnp) {
// Setup the environment to be able to require typescript/bin/tsc
require(absPnpApiPath).setup();
}
}

// Defer to the real typescript/bin/tsc your application uses
module.exports = absRequire(`typescript/bin/tsc`);
Loading