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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move semver to prod dependencies #3413

Merged
merged 1 commit into from Sep 25, 2022

Conversation

timja
Copy link
Contributor

@timja timja commented Sep 16, 2022

Motivation/Description of the PR

  • Description of this PR, which problem it solves
  • Resolves #issueId (if applicable).

On a yarn 3 installation which uses PnP I was not able to use CodeceptJs because it complains that semver is trying to be used but it's not listed in dependencies, it is in devDependencies but it does seem to be used in some places outside of the tests so I think it's correct to move it to dependencies.

error:

/Users/timja/projects/hmcts/labs-timja-nodejs/.pnp.cjs:27151
      Error.captureStackTrace(firstError);
            ^

Error: codeceptjs tried to access semver, but it isn't declared in its dependencies; this makes the require call ambiguous and unsound.

Required package: semver
Required by: codeceptjs@virtual:0fe8ae6be068d2f30e6e1c4ad9d0c715db41428fa3e9a2c42a5aa8d93fba288315271172dae737de2f4d34a9b38ebab987b8667f4cbf6aa1a2f33cbd30fb6c1b#npm:3.3.5 (via /Users/timja/projects/hmcts/labs-timja-nodejs/.yarn/__virtual__/codeceptjs-virtual-ff12dc7118/0/cache/codeceptjs-npm-3.3.5-b4e2dcc1a7-484455c175.zip/node_modules/codeceptjs/lib/command/)

Require stack:
- /Users/timja/projects/hmcts/labs-timja-nodejs/.yarn/__virtual__/codeceptjs-virtual-ff12dc7118/0/cache/codeceptjs-npm-3.3.5-b4e2dcc1a7-484455c175.zip/node_modules/codeceptjs/lib/command/utils.js
- /Users/timja/projects/hmcts/labs-timja-nodejs/.yarn/__virtual__/codeceptjs-virtual-ff12dc7118/0/cache/codeceptjs-npm-3.3.5-b4e2dcc1a7-484455c175.zip/node_modules/codeceptjs/bin/codecept.js
    at Function.require$$0.Module._resolveFilename (/Users/timja/projects/hmcts/labs-timja-nodejs/.pnp.cjs:27151:13)
    at Function.require$$0.Module._load (/Users/timja/projects/hmcts/labs-timja-nodejs/.pnp.cjs:27005:42)
    at Module.require (node:internal/modules/cjs/loader:1005:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at Object.<anonymous> (/Users/timja/projects/hmcts/labs-timja-nodejs/.yarn/__virtual__/codeceptjs-virtual-ff12dc7118/0/cache/codeceptjs-npm-3.3.5-b4e2dcc1a7-484455c175.zip/node_modules/codeceptjs/lib/command/utils.js:3:16)
    at Module._compile (node:internal/modules/cjs/loader:1105:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1159:10)
    at Object.require$$0.Module._extensions..js (/Users/timja/projects/hmcts/labs-timja-nodejs/.pnp.cjs:27195:33)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.require$$0.Module._load (/Users/timja/projects/hmcts/labs-timja-nodejs/.pnp.cjs:27035:14)

usage location:

lib/command/utils.js
3:const semver = require('semver');
68:  if (!semver.satisfies(process.version, version)) {

runok.js
378:      packageInfo.version = semver.inc(packageInfo.version, releaseType);
402:    const semver = require('semver');
412:      const newVersion = semver.inc(packageFile.version, type);

Applicable helpers:

  • WebDriver
  • Puppeteer
  • Nightmare
  • REST
  • FileHelper
  • Appium
  • Protractor
  • TestCafe
  • Playwright

Applicable plugins:

  • allure
  • autoDelay
  • autoLogin
  • customLocator
  • pauseOnFail
  • coverage
  • retryFailedStep
  • screenshotOnFail
  • selenoid
  • stepByStepReport
  • stepTimeout
  • wdio
  • subtitles

Type of change

  • 馃敟 Breaking changes
  • 馃殌 New functionality
  • 馃悰 Bug fix
  • 馃搵 Documentation changes/updates
  • 鈾笍 Hot fix
  • 馃敤 Markdown files fix - not related to source code
  • 馃拝 Polish code

Checklist:

  • [ ] Tests have been added
  • [ ] Documentation has been added (Run npm run docs)
  • Lint checking (Run npm run lint)
    I wasn't able to run the git hooks or even npm install on my machine in this repository, looking at CI it uses node 12.8.0 which doesn't even run on my architecture (arm64).
  • Local tests are passed (Run npm test)
    again npm install fails

Copy link
Member

@Arhell Arhell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

褋褋 @DavertMik

@timja
Copy link
Contributor Author

timja commented Sep 22, 2022

Any chance of a review? of this and codeceptjs/configure#32

Much appreciated, thanks!

@DavertMik
Copy link
Contributor

Thanks for catching this!
Merging!

@DavertMik DavertMik merged commit 4319235 into codeceptjs:3.x Sep 25, 2022
@timja timja deleted the move-semver-to-prod-deps branch September 25, 2022 20:06
@timja
Copy link
Contributor Author

timja commented Sep 26, 2022

Would it be possible to get a release @DavertMik?
This would allow using CodeceptJS with yarn v3 and PnP

Thanks for the merge!

@DavertMik
Copy link
Contributor

Yes, i was planning to do it today

@timja
Copy link
Contributor Author

timja commented Oct 2, 2022

Yes, i was planning to do it today

hey @DavertMik if you get a chance a release would be appreciated, thanks :)

@DavertMik
Copy link
Contributor

@timja I am really sorry I fucked up my promises 馃槶
sorry had a very busy week and to be honest it is still continues
will take work on it now

@timja
Copy link
Contributor Author

timja commented Oct 5, 2022

No worries at all, I understand, just when you have time, much appreciated 馃槃

nlespiaucq pushed a commit to nlespiaucq/CodeceptJS that referenced this pull request Oct 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants