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

latest jsii-rosetta package is not used. #4098

Closed
acomagu opened this issue May 14, 2023 · 5 comments · Fixed by #4487
Closed

latest jsii-rosetta package is not used. #4098

acomagu opened this issue May 14, 2023 · 5 comments · Fixed by #4487
Labels
bug This issue is a bug. p1

Comments

@acomagu
Copy link

acomagu commented May 14, 2023

Describe the bug

jsii-rosetta moved to another repository and v5.0.x is released, but packages in this repository, such as jsii-pacmak, seems to depend on the old package.

Expected Behavior

jsii-pacmak depends on jsii-rosetta latest release(currently v5.0.7).

Current Behavior

jsii-pacmak depends on jsii-rosetta v1.81.0.

Reproduction Steps

In empty directory, running npm i jsii-pacmak && npm ls --all will shows following results:

empty-repo
└─┬ jsii-pacmak@1.81.0
...
  ├─┬ jsii-rosetta@1.81.0
...

But jsii-rosetta@5.0.7 should be installed.

(And running npx jsii-pacmak shows deprecation error even though installed latest jsii-pacmak.

#######################################################################################################
### You are currently using jsii@1.x. We recommend upgrading to jsii@5.0.x or later. This will      ###
### allow you to use modern TypeScript syntax, and improves compatibility with many common          ###
### dependencies. For example, recent versions of @types/node.                                      ###
###                                                                                                 ###
### 5.0.x and subsequent releases of jsii use the same major.minor version as the TypeScript        ###
### compiler they are built on. We recommend declaring a minor-pinned (also known as "tilde")       ###
### dependency on jsii (e.g: `"jsii": "5.0.x"` or `"jsii": "~5.0.7"`).                              ###
###                                                                                                 ###
### For more information, see: https://aws.github.io/jsii/compiler-and-rosetta-maintenance/         ###
###                                                                                                 ###
### This warning can be suppressed by setting the JSII_SUPPRESS_UPGRADE_PROMPT environment variable ###
#######################################################################################################
#######################################################################################################
### You are currently using jsii-rosetta@1.x. We recommend upgrading to jsii-rosetta@5.0.x or       ###
### later. This will allow you to use modern TypeScript syntax, and improves compatibility with     ###
### many common dependencies. For example, recent versions of @types/node.                          ###
###                                                                                                 ###
### 5.0.x and subsequent releases of jsii-rosetta use the same major.minor version as the           ###
### TypeScript compiler they are built on. We recommend declaring a minor-pinned (also known as     ###
### "tilde") dependency on jsii-rosetta (e.g: `"jsii-rosetta": "5.0.x"` or                          ###
### `"jsii-rosetta": "~5.0.7"`).                                                                    ###
###                                                                                                 ###
### For more information, see: https://aws.github.io/jsii/compiler-and-rosetta-maintenance/         ###
###                                                                                                 ###
### This warning can be suppressed by setting the JSII_SUPPRESS_UPGRADE_PROMPT environment variable ###
#######################################################################################################

)

Possible Solution

No response

Additional Information/Context

No response

SDK version used

1.18.0

Environment details (OS name and version, etc.)

Linux acm-envy3-win 5.15.90.1-microsoft-standard-WSL2 #1 SMP Fri Jan 27 02:56:13 UTC 2023 x86_64 GNU/Linux

@acomagu acomagu added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels May 14, 2023
@dchurchill
Copy link

I'm having this issue as well.

jsii-config 1.82.0
jsii 5.0.9
jsii-pacmak 1.8.2
jsii-rosetta 5.0.9 (added to dependencies manually)

MacBook M1 with Ventura 13.4 running in docker container:
Linux af7a1abd0672 5.15.49-linuxkit #1 SMP PREEMPT Tue Sep 13 07:51:32 UTC 2022 aarch64 GNU/Linux

@mgwidmann
Copy link

Workaround for fixing this with pnpm as an example. Add the following to your package.json file:

  "pnpm": {
    "overrides": {
      "jsii-rosetta": "~5.1.0"
    }
  },

Then pnpm install and try to run jsii-pacmak again and the warning should go away.

@webratz
Copy link

webratz commented Jun 9, 2023

For yarn I'm using

  "resolutions": {
    "jsii-rosetta": "~5.1.0"
  },

but this results in Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './lib/commands/transliterate' is not defined by "exports" so i guess at least jsii-docgen still needs the old version.

@mrpackethead
Copy link

I am experiencing this problem as well.

@mrgrain mrgrain added p1 and removed needs-triage This issue or PR still needs to be triaged. labels Apr 9, 2024
@mergify mergify bot closed this as completed in #4487 Apr 26, 2024
mergify bot pushed a commit that referenced this issue Apr 26, 2024
…4487)

Fixes #4098 

Previously jsii-pacmak depended on jsii-rosetta 1.x. This is problematic if a different version of the jsii compiler was used, because it introduced different versions of TypeScript into the project.

With this PR, the dependency is changed to a peer dependency. Thus allowing any compatible version jsii-rosetta to be used. 

BREAKING CHANGE: jsii-pacmak now has a peer dependency on jsii-rosetta. Please ensure a version of jsii-rosetta matching your version of jsii is available. Most package managers install peer dependencies automatically and no change is required. However users of yarn v1 or npm v3 to v6 must install jsii-rosetta manually.

---

By submitting this pull request, I confirm that my contribution is made under the terms of the [Apache 2.0 license].

[Apache 2.0 license]: https://www.apache.org/licenses/LICENSE-2.0
Copy link
Contributor

This issue is now closed. Comments on closed issues are hard for our team to see.
If you need more assistance, please open a new issue that references this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue is a bug. p1
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants