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

[Bug]: jasmine_test doesn't work if type = "module" in package.json #33

Closed
1 task
gonzojive opened this issue Jan 16, 2023 · 0 comments · Fixed by #41
Closed
1 task

[Bug]: jasmine_test doesn't work if type = "module" in package.json #33

gonzojive opened this issue Jan 16, 2023 · 0 comments · Fixed by #41
Labels
bug Something isn't working

Comments

@gonzojive
Copy link

What happened?

I had to change type = "module" to type = "commonjs" to get the jasmine test to work properly: gonzojive/gTile@8b4ecde

... I can give error details later

Version

Development (host) and target OS/architectures:

Output of bazel --version:

Version of the Aspect rules, or other relevant rules from your
WORKSPACE or MODULE.bazel file:

module(
    name = "gtile",
    version = "50.0",
    compatibility_level = 1,
)

bazel_dep(name = "platforms", version = "0.0.6")

# 1. The metadata of glog is fetched from the BCR, including its dependencies (gflags).
# 2. The `repo_name` attribute allows users to reference this dependency via the `com_github_google_glog` repo name.
bazel_dep(name = "glog", version = "0.5.0", repo_name = "com_github_google_glog")

bazel_dep(name = "rules_nodejs", version = "5.5.3")
bazel_dep(name = "aspect_rules_js", version = "1.14.0")
bazel_dep(name = "aspect_bazel_lib", version = "1.21.4")

git_override(
    module_name = "aspect_rules_js",
    commit = "850cb49c8649e463b80ef7984e7c744279746170",
    remote = "https://github.com/aspect-build/rules_js.git",
)

pnpm = use_extension("@aspect_rules_js//npm:extensions.bzl", "pnpm")

pnpm.pnpm(
    name = "gtile_pnpm",
)

use_repo(pnpm, "pnpm")

npm = use_extension("@aspect_rules_js//npm:extensions.bzl", "npm", dev_dependency = True)

npm.npm_translate_lock(
    name = "npm",
    pnpm_lock = "//:pnpm-lock.yaml",
)

use_repo(npm, "npm")

# https://github.com/aspect-build/rules_ts
bazel_dep(name = "aspect_rules_ts", version = "1.0.5")

rules_ts_ext = use_extension(
    "@aspect_rules_ts//ts:extensions.bzl",
    "ext",
    dev_dependency = True,
)

rules_ts_ext.deps()

use_repo(rules_ts_ext, "npm_typescript")

use_repo(rules_ts_ext, "npm_google_protobuf")

use_repo(rules_ts_ext, "npm_at_bazel_worker")

Language(s) and/or frameworks involved:

How to reproduce

Check out https://github.com/gonzojive/gTile/commit/8b4ecdeef07c1f831c84e838522888d116490e32 and change `type = "commonjs"` to `type = "module"` in `package.json`.

Any other information?

I think runner.js could be renamed runner.cjs, and this problem would be averted.

Fund our work

  • Sponsor our open source work by donating a bug bounty
@gonzojive gonzojive added the bug Something isn't working label Jan 16, 2023
@jbedard jbedard self-assigned this Jan 17, 2023
@gregmagolan gregmagolan moved this to 📋 Backlog in Open Source Feb 5, 2023
dgp1130 added a commit to dgp1130/rules_prerender that referenced this issue Mar 1, 2023
dgp1130 added a commit to dgp1130/rules_prerender that referenced this issue Mar 1, 2023
dgp1130 added a commit to dgp1130/rules_prerender that referenced this issue Mar 1, 2023
dgp1130 added a commit to dgp1130/rules_prerender that referenced this issue Mar 1, 2023
dgp1130 added a commit to dgp1130/rules_prerender that referenced this issue Mar 1, 2023
dgp1130 added a commit to dgp1130/rules_prerender that referenced this issue Mar 1, 2023
This fixes aspect-build/rules_jasmine#33 and adds ESM support. I've sent a PR in aspect-build/rules_jasmine#41 to apply the fix upstream, but for now a patch will have to do.
dgp1130 added a commit to dgp1130/rules_prerender that referenced this issue Mar 4, 2023
This fixes aspect-build/rules_jasmine#33 and adds ESM support. I've sent a PR in aspect-build/rules_jasmine#41 to apply the fix upstream, but for now a patch will have to do.
dgp1130 added a commit to dgp1130/rules_prerender that referenced this issue Mar 4, 2023
This fixes aspect-build/rules_jasmine#33 and adds ESM support. I've sent a PR in aspect-build/rules_jasmine#41 to apply the fix upstream, but for now a patch will have to do.
dgp1130 added a commit to dgp1130/rules_prerender that referenced this issue Mar 4, 2023
This fixes aspect-build/rules_jasmine#33 and adds ESM support. I've sent a PR in aspect-build/rules_jasmine#41 to apply the fix upstream, but for now a patch will have to do.
dgp1130 added a commit to dgp1130/rules_prerender that referenced this issue Mar 4, 2023
Refs #33.

This fixes aspect-build/rules_jasmine#33 and adds ESM support. I've sent a PR in aspect-build/rules_jasmine#41 to apply the fix upstream, but for now a patch will have to do.
@github-project-automation github-project-automation bot moved this from 📋 Backlog to ✅ Done in Open Source Mar 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants