Skip to content

Commit

Permalink
Rename js_glob as js_library_glob
Browse files Browse the repository at this point in the history
Summary: Changelog: [Internal]

Reviewed By: motiz88

Differential Revision: D37686882

fbshipit-source-id: 467575fa0effaf67524b2c56e65519c32ec6dbd9
  • Loading branch information
huntie authored and facebook-github-bot committed Jul 12, 2022
1 parent 86b4acb commit a322a7a
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 53 deletions.
4 changes: 2 additions & 2 deletions IntegrationTests/BUCK
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
load("@fbsource//tools/build_defs:js_glob.bzl", "js_glob")
load("@fbsource//tools/build_defs:js_library_glob.bzl", "js_library_glob")
load("@fbsource//tools/build_defs/oss:metro_defs.bzl", "rn_library")

# This file was generated by running
# js1 build buckfiles

rn_library(
name = "IntegrationTests",
srcs = js_glob(
srcs = js_library_glob(
[
"**/*",
],
Expand Down
4 changes: 2 additions & 2 deletions ReactAndroid/src/androidTest/js/BUCK
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
load("//tools/build_defs:js_glob.bzl", "js_glob")
load("//tools/build_defs:js_library_glob.bzl", "js_library_glob")
load("//tools/build_defs/oss:metro_defs.bzl", "rn_library")

# This file was generated by running
# js1 build buckfiles

rn_library(
name = "js",
srcs = js_glob(
srcs = js_library_glob(
[
"**/*",
],
Expand Down
4 changes: 2 additions & 2 deletions packages/assets/BUCK
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
load("@fbsource//tools/build_defs:js_glob.bzl", "js_glob")
load("@fbsource//tools/build_defs:js_library_glob.bzl", "js_library_glob")
load("@fbsource//tools/build_defs/third_party:yarn_defs.bzl", "yarn_workspace")
load("@fbsource//xplat/js:JS_DEFS.bzl", "rn_library")

rn_library(
name = "assets",
srcs = js_glob([
srcs = js_library_glob([
"**/*",
"package.json",
]),
Expand Down
4 changes: 2 additions & 2 deletions packages/normalize-color/BUCK
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
load("@fbsource//tools/build_defs:js_glob.bzl", "js_glob")
load("@fbsource//tools/build_defs:js_library_glob.bzl", "js_library_glob")
load("@fbsource//tools/build_defs/third_party:yarn_defs.bzl", "yarn_workspace")
load("@fbsource//xplat/js:JS_DEFS.bzl", "rn_library")

rn_library(
name = "normalize-color",
srcs = js_glob([
srcs = js_library_glob([
"**/*",
"package.json",
]),
Expand Down
4 changes: 2 additions & 2 deletions packages/rn-tester/BUCK
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ load(
"//tools/build_defs/oss:rn_defs.bzl",
"APPLE",
"YOGA_APPLE_TARGET",
"js_glob",
"js_library_glob",
"make_resource_glob",
"react_fabric_component_plugin_provider",
"react_module_plugin_providers",
Expand Down Expand Up @@ -46,7 +46,7 @@ yarn_workspace(

rn_library(
name = "rn-tester",
srcs = js_glob(
srcs = js_library_glob(
[
"js",
"NativeModuleExample",
Expand Down
40 changes: 0 additions & 40 deletions tools/build_defs/js_glob.bzl

This file was deleted.

9 changes: 9 additions & 0 deletions tools/build_defs/js_library_glob.bzl
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Copyright (c) Meta Platforms, Inc. and affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.

"""Special globbing for js libraries, including and excluding certain files"""

def js_library_glob(dirs, excludes = []):
return []
6 changes: 3 additions & 3 deletions tools/build_defs/oss/rn_defs.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ This lets us build React Native:
# @lint-ignore-every BUCKRESTRICTEDSYNTAX

load(
"//tools/build_defs:js_glob.bzl",
_js_glob = "js_glob",
"//tools/build_defs:js_library_glob.bzl",
_js_library_glob = "js_library_glob",
)

_DEBUG_PREPROCESSOR_FLAGS = []
Expand Down Expand Up @@ -306,7 +306,7 @@ def _paths_join(path, *others):

return result

js_glob = _js_glob
js_library_glob = _js_library_glob

def subdir_glob(glob_specs, exclude = None, prefix = ""):
"""Returns a dict of sub-directory relative paths to full paths.
Expand Down

0 comments on commit a322a7a

Please sign in to comment.