Skip to content

Commit

Permalink
Merge branch 'main' into jvm-async-node-ability-to-remove-resolved-as…
Browse files Browse the repository at this point in the history
…ync-node
  • Loading branch information
sakuntala-motukuri authored Sep 3, 2024
2 parents 5b850e0 + ccc758a commit df5c4d6
Show file tree
Hide file tree
Showing 10 changed files with 11,340 additions and 9,261 deletions.
1 change: 0 additions & 1 deletion BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ exports_files([
".editorconfig",
".all-contributorsrc",
"README.md",
# "patches/@[email protected]",
])

js_library(
Expand Down
3 changes: 3 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ If the changes are larger (API design, architecture, etc), [opening an issue](ht
* [Signed Commits](https://docs.github.com/en/authentication/managing-commit-signature-verification/about-commit-signature-verification). For convenience it is recommended to set git to sign all commits by default as mentioned [here](https://docs.github.com/en/authentication/managing-commit-signature-verification/telling-git-about-your-signing-key)

## Building and Testing Locally (All platforms)

> This project also contains [just](https://github.com/casey/just) recipes for many common commands. They can be listed using `just -l`
### Player
For speed and consistency, this repo leverages `bazel` as it's main build tool. Check out the [bazel](https://bazel.build/) docs for more info.

Expand Down
18 changes: 9 additions & 9 deletions MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,18 @@ module(
bazel_dep(name = "rules_player")

archive_override(
module_name = "rules_player",
strip_prefix = "rules_player-1.1.4",
urls = ["https://github.com/player-ui/rules_player/archive/refs/tags/v1.1.4.tar.gz"],
integrity = "sha256-5YsvzRBeBV2dVgRorGouQfdkb/lu1W8k24QAIModpLw=",
module_name = "rules_player",
strip_prefix = "rules_player-1.1.5",
urls = ["https://github.com/player-ui/rules_player/archive/refs/tags/v1.1.5.tar.gz"],
integrity = "sha256-sotB/beOkcn7FD+NurO6Uqi2OoKbbXHd7ya4ZO9nBCg="
)

# local_path_override(module_name = "rules_player", path = "../rules_player")

bazel_dep(name = "aspect_bazel_lib", version = "2.7.8")
bazel_dep(name = "aspect_rules_js", version = "1.42.3")
bazel_dep(name = "aspect_bazel_lib", version = "2.8.0")
bazel_dep(name = "aspect_rules_js", version = "2.0.0")
bazel_dep(name = "bazel_skylib", version = "1.7.1")
bazel_dep(name = "rules_pkg", version = "1.0.1")
bazel_dep(name = "aspect_rules_ts", version = "2.4.2")
bazel_dep(name = "aspect_rules_ts", version = "3.0.0")

# C++
bazel_dep(name = "rules_foreign_cc", version = "0.11.1")
Expand All @@ -34,7 +33,7 @@ node.toolchain(node_version = "20.14.0")
###### Start iOS ######
## Rule Dependencies
bazel_dep(name = "rules_apple", version = "3.5.1", repo_name = "build_bazel_rules_apple")
bazel_dep(name = "rules_ios", version = "4.3.1", repo_name = "build_bazel_rules_ios")
bazel_dep(name = "rules_ios", version = "4.8.2", repo_name = "build_bazel_rules_ios")
bazel_dep(name = "rules_xcodeproj", version = "2.2.0")
bazel_dep(name = "gazelle", version = "0.34.0", repo_name = "bazel_gazelle")
bazel_dep(name = "rules_swift_package_manager", version = "0.22.0")
Expand Down Expand Up @@ -71,6 +70,7 @@ npm.npm_translate_lock(
npmrc = "//:.npmrc",
pnpm_lock = "//:pnpm-lock.yaml",
verify_node_modules_ignored = "//:.bazelignore",
npm_package_target_name = "{dirname}"
)
use_repo(npm, "npm")

Expand Down
53 changes: 53 additions & 0 deletions justfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
[doc('Build all JS/TS files')]
build-js:
bazel build -- $(bazel query "kind(npm_package, //...)" --output label 2>/dev/null | tr '\n' ' ')

[doc('Build all core JS/TS files')]
build-core:
bazel build //core/...

[doc('Test targets in the project')]
test-all:
bazel test //...

[doc('Test all JS/TS files')]
test-js:
bazel test -- $(bazel query "kind(js_test, //...)" --output label 2>/dev/null | tr '\n' ' ')

[doc('Test all core JS/TS files')]
test-core:
bazel test //core/...

[doc('Lint all JS/TS files')]
lint-js:
bazel test -- $(bazel query "kind(js_test, //...) intersect attr(name, 'eslint$', //...)" --output label 2>/dev/null | tr '\n' ' ')

[doc('Run a dev server of the main docs page')]
start-docs:
bazel run //docs/site:start

[doc('Run a dev server of storybook')]
start-storybook:
bazel run //docs/storybook:start

[doc('Install all generated artifacts into the system .m2 repository')]
mvn-install:
#!/usr/bin/env bash
set -u -e -o pipefail
# Find all the maven packages in the repo
readonly DEPLOY_LABELS=$(bazel query --output=label 'kind("maven_publish rule", //...) - attr("tags", "\[.*do-not-publish.*\]", //...)')
for pkg in $DEPLOY_LABELS ; do
bazel run "$pkg" --define=maven_repo="file://$HOME/.m2/repository"
done

alias maven-install := mvn-install

[doc('Generate and open the xcodeproj for Player')]
dev-ios:
bazel run //ios:xcodeproj
open -a Xcode ios/PlayerUI.xcodeproj/

[doc('Build and run the iOS demo app in a simulator')]
start-ios-demo:
bazel run //ios/demo:PlayerUIDemo
17 changes: 7 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,11 @@
"type": "git",
"url": "https://github.com/player-ui/player.git"
},
"scripts": {
"dev:docs": "ibazel run //docs/site:start",
"lint": "eslint --cache --ext .js,.jsx,.ts,.tsx $(scripts/pkg-roots.sh)",
"prepare": "is-ci || husky install",
"test": "bazel test -- $(bazel query \"kind(nodejs_test, //...)\" --output label 2>/dev/null | tr '\\n' ' ')"
},
"engines": {
"node": "^20.14.0",
"pnpm": "^8.9.2"
"pnpm": "^9.7.0"
},
"packageManager": "pnpm@8.9.2",
"packageManager": "pnpm@9.7.0",
"dependencies": {
"@auto-it/omit-release-notes": "^11.2.0",
"@auto-it/upload-assets": "^11.2.0",
Expand Down Expand Up @@ -116,7 +110,7 @@
"husky": "^7.0.2",
"is-ci-cli": "^2.2.0",
"lcov-result-merger": "^3.1.0",
"leven":"4.0.0",
"leven": "4.0.0",
"lint-staged": "^11.2.3",
"lucide-react": "^0.316.0",
"lunr": "^2.3.9",
Expand Down Expand Up @@ -192,7 +186,10 @@
},
"volta": {
"node": "20.16.0",
"pnpm": "8.15.1"
"pnpm": "9.7.0"
},
"pnpm": {
"onlyBuiltDependencies": []
},
"resolutions": {
"esbuild": "0.19.8",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import { describe, test, vitest, expect, beforeEach } from "vitest";
import React from "react";
import React, { act } from "react";
import {
screen,
render,
act,
fireEvent,
waitFor,
configure,
Expand Down
Loading

0 comments on commit df5c4d6

Please sign in to comment.