apickli / apickli

apickli - REST API integration testing framework based on cucumber.js
MIT License
207 stars 94 forks source link

Compatibility with @cucumber/cucumber:^7 #180

Closed fmartinou closed 3 years ago

fmartinou commented 3 years ago

Hi,

Cucumber changed from namespace some time ago moving:

Currently, we're stuck on cucumber v5 because apickli isn't imported the new namespace.

package.json from apickli

{
    "devDependencies": {
        "cucumber": "^5"
    }
}

Cucumber import from apickli (apickli-gherkin.js)

const {Before, Given, When, Then} = require('cucumber');

My package.json

{
    "dependencies": {
        "apickli": "2.3.4",
        "@cucumber/cucumber": "7.2.1"
    }
}

My error

Error: Cannot find module 'cucumber'
Require stack:
- xxx/node_modules/apickli/apickli-gherkin.js
- xxx/features/step_definitions/api.js
- xxx/node_modules/@cucumber/cucumber/lib/cli/index.js
- xxx/node_modules/@cucumber/cucumber/lib/cli/run.js
- xxx/node_modules/@cucumber/cucumber/bin/cucumber-js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:885:15)
    at Function.Module._load (internal/modules/cjs/loader.js:730:27)
    at Module.require (internal/modules/cjs/loader.js:957:19)
    at require (internal/modules/cjs/helpers.js:88:18)
    at Object.<anonymous> (xxx/node_modules/apickli/apickli-gherkin.js:6:37)

Could you upgrade your code & your dependencies to depend on the latest @cucumber/cucumber package?

geertendoornenbal commented 3 years ago

Yes please, this would be nice. Especially because new cucumber has more support for typescript.

seymen commented 3 years ago

@fmartinou @geertendoornenbal - would appreciate your feedback for PR #181

fmartinou commented 3 years ago

Thanks for your PR @seymen

I manually tested your changes on one of my projects with success. LGTM 👍

geertendoornenbal commented 3 years ago

Same here