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: remove ts_setup_workspace #2034

Merged
merged 1 commit into from
Jul 13, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 0 additions & 4 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -130,10 +130,6 @@ load("@build_bazel_rules_typescript//internal:ts_repositories.bzl", "ts_setup_de

ts_setup_dev_workspace()

load("//packages/typescript/internal:ts_repositories.bzl", "ts_setup_workspace")

ts_setup_workspace()

#
# Install @bazel/cypress dependencies
#
Expand Down
4 changes: 0 additions & 4 deletions e2e/ts_devserver/WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,6 @@ yarn_install(
yarn_lock = "//:yarn.lock",
)

load("@npm//@bazel/typescript:index.bzl", "ts_setup_workspace")

ts_setup_workspace()

load("@npm//@bazel/protractor:package.bzl", "npm_bazel_protractor_dependencies")

npm_bazel_protractor_dependencies()
Expand Down
4 changes: 0 additions & 4 deletions e2e/typescript/WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,3 @@ yarn_install(
package_json = "//:package.json",
yarn_lock = "//:yarn.lock",
)

load("@npm//@bazel/typescript:index.bzl", "ts_setup_workspace")

ts_setup_workspace()
5 changes: 0 additions & 5 deletions examples/angular/WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,6 @@ browser_repositories(
firefox = True,
)

# Setup the rules_typescript tooolchain
load("@npm//@bazel/typescript:index.bzl", "ts_setup_workspace")

ts_setup_workspace()

# Setup the rules_sass toolchain
load("@io_bazel_rules_sass//sass:sass_repositories.bzl", "sass_repositories")

Expand Down
5 changes: 0 additions & 5 deletions examples/angular_view_engine/WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,6 @@ browser_repositories(
firefox = True,
)

# Setup the rules_typescript tooolchain
load("@npm//@bazel/typescript:index.bzl", "ts_setup_workspace")

ts_setup_workspace()

# Setup the rules_sass toolchain
load("@io_bazel_rules_sass//sass:sass_repositories.bzl", "sass_repositories")

Expand Down
4 changes: 0 additions & 4 deletions examples/app/WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,6 @@ yarn_install(
yarn_lock = "//:yarn.lock",
)

load("@npm//@bazel/typescript:index.bzl", "ts_setup_workspace")

ts_setup_workspace()

load("@npm//@bazel/protractor:package.bzl", "npm_bazel_protractor_dependencies")

npm_bazel_protractor_dependencies()
Expand Down
4 changes: 0 additions & 4 deletions examples/protocol_buffers/WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,6 @@ browser_repositories(
firefox = True,
)

load("@npm//@bazel/typescript:index.bzl", "ts_setup_workspace")

ts_setup_workspace()

load("@com_google_protobuf//:protobuf_deps.bzl", "protobuf_deps")

protobuf_deps()
4 changes: 0 additions & 4 deletions examples/user_managed_deps/WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,3 @@ go_register_toolchains()
load("@build_bazel_rules_typescript//internal:ts_repositories.bzl", "ts_setup_dev_workspace")

ts_setup_dev_workspace()

load("@build_bazel_rules_nodejs//packages/typescript/internal:ts_repositories.bzl", "ts_setup_workspace")

ts_setup_workspace()
4 changes: 0 additions & 4 deletions examples/web_testing/WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,3 @@ browser_repositories(
chromium = True,
firefox = True,
)

load("@npm//@bazel/typescript:index.bzl", "ts_setup_workspace")

ts_setup_workspace()
6 changes: 0 additions & 6 deletions packages/create/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -162,13 +162,7 @@ http_archive(
)

${pkgMgr === 'yarn' ? yarnInstallCmd : npmInstallCmd}`;
if (args['typescript']) {
workspaceContent += `

# Setup TypeScript toolchain
load("//packages/typescript:index.bzl", "ts_setup_workspace")
ts_setup_workspace()`;
}
write('WORKSPACE.bazel', workspaceContent);
write('.bazelignore', `node_modules
dist
Expand Down
4 changes: 0 additions & 4 deletions packages/create/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,3 @@ let pkgContent = read('with_ts/package.json');
if (pkgContent.indexOf('"@bazel/typescript": "latest"') < 0) {
fail('should install @bazel/typescript dependency', pkgContent);
}
wkspContent = read('with_ts/WORKSPACE.bazel');
if (wkspContent.indexOf('ts_setup_workspace(') < 0) {
fail('should install extra TS repositories');
}
2 changes: 0 additions & 2 deletions packages/typescript/index.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,8 @@ Users should not load files under "/internal"
load("//packages/typescript/internal:build_defs.bzl", _ts_library = "ts_library_macro")
load("//packages/typescript/internal:ts_config.bzl", _ts_config = "ts_config")
load("//packages/typescript/internal:ts_project.bzl", _ts_project = "ts_project_macro")
load("//packages/typescript/internal:ts_repositories.bzl", _ts_setup_workspace = "ts_setup_workspace")
load("//packages/typescript/internal/devserver:ts_devserver.bzl", _ts_devserver = "ts_devserver_macro")

ts_setup_workspace = _ts_setup_workspace
ts_library = _ts_library
ts_config = _ts_config
ts_devserver = _ts_devserver
Expand Down
2 changes: 0 additions & 2 deletions packages/typescript/index.docs.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,8 @@ So this is a copy of index.bzl with macro indirection removed.
load("//packages/typescript/internal:build_defs.bzl", _ts_library = "ts_library")
load("//packages/typescript/internal:ts_config.bzl", _ts_config = "ts_config")
load("//packages/typescript/internal:ts_project.bzl", _ts_project = "ts_project_macro")
load("//packages/typescript/internal:ts_repositories.bzl", _ts_setup_workspace = "ts_setup_workspace")
load("//packages/typescript/internal/devserver:ts_devserver.bzl", _ts_devserver = "ts_devserver")

ts_setup_workspace = _ts_setup_workspace
ts_library = _ts_library
ts_config = _ts_config
ts_project = _ts_project
Expand Down
8 changes: 0 additions & 8 deletions packages/typescript/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,6 @@ $ npm install --save-dev @bazel/typescript

Watch for any peerDependency warnings - we assume you have already installed the `typescript` package from npm.

Some rules require you to add this to your `WORKSPACE` file:

```python
# Set up TypeScript toolchain
load("@npm//@bazel/typescript:index.bzl", "ts_setup_workspace")
ts_setup_workspace()
```

Create a `BUILD.bazel` file in your workspace root. If your `tsconfig.json` file is in the root, use

```python
Expand Down
1 change: 0 additions & 1 deletion packages/typescript/internal/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ filegroup(
"build_defs.bzl",
"ts_config.bzl",
"ts_project.bzl",
"ts_repositories.bzl",
"//packages/typescript/internal/devserver:package_contents",
],
visibility = ["//packages/typescript:__subpackages__"],
Expand Down
5 changes: 0 additions & 5 deletions packages/typescript/internal/internal_ts_repositories.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,8 @@ load("@bazel_gazelle//:deps.bzl", "go_repository")
def ts_setup_dev_workspace():
"""
Setup the toolchain needed for local development, but not needed by users.

These needs to be in a separate file from ts_setup_workspace() so as not
to leak load statements.
"""

ts_setup_workspace()

go_repository(
name = "com_github_kylelemons_godebug",
commit = "9ff306d4fbead574800b66369df5b6144732d58e", # v1.1.0
Expand Down
27 changes: 0 additions & 27 deletions packages/typescript/internal/ts_repositories.bzl

This file was deleted.