Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

fix: glob backward compatibility #4775

Merged
merged 7 commits into from
Jan 29, 2025
Merged

Conversation

kobenguyent
Copy link
Collaborator

Motivation/Description of the PR

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

Applicable helpers:

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

Applicable plugins:

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

Type of change

  • 🔥 Breaking changes
  • 🚀 New functionality
  • 🐛 Bug fix
  • 🧹 Chore
  • 📋 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)
  • Local tests are passed (Run npm test)

@kobenguyent kobenguyent requested a review from DavertMik January 22, 2025 06:58
@kobenguyent
Copy link
Collaborator Author

published as codeceptjs@3.7.0-beta.7 for testing.

@DavertMik
Copy link
Contributor

I'm not sure if we use it correctly:

image

In 10-11 our glob = require('glob') probably won't work

https://github.com/isaacs/node-glob/blob/main/changelog.md#1000

Copy link
Contributor

@DavertMik DavertMik left a comment

Choose a reason for hiding this comment

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

I didn't test this notation, but we need to ensure we use compatible glob version

Also I'm concerned that we can actually use glob from v11 because of no named exports

package.json Outdated Show resolved Hide resolved
kobenguyent and others added 4 commits January 23, 2025 07:36
@kobenguyent kobenguyent requested a review from DavertMik January 27, 2025 14:06
@DavertMik
Copy link
Contributor

DavertMik commented Jan 29, 2025

@kobenguyent please change the notation where glob is used

so instead of

const glob = require('glob')

we would have

const { globSync }  = require('glob')

as it is recommended now in docs

I checked it works on 9 and 11 version

@kobenguyent kobenguyent merged commit 7030c7f into 3.x Jan 29, 2025
12 checks passed
@kobenguyent kobenguyent deleted the glob-backward-compitibilty branch January 29, 2025 07:05
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants