From 0ef6beb26aa3500c6d631f6c25f788344c6fe96a Mon Sep 17 00:00:00 2001 From: Rajab Natshah Date: Sat, 1 Aug 2026 17:37:38 +0300 Subject: [PATCH] feat: change the scope to @webship-js/diffy-steps (#3) "name": "@webship/diffy-steps", -> "name": "@webship-js/diffy-steps", @webship is the GitHub organisation covering the whole Webship product family - the Drupal distribution, the web* modules, the theme, the patch metapackages - almost none of which is JavaScript or belongs on npm. This package is a plugin for the webship-js harness and is useful with nothing else, so the scope names what it plugs into. It also reads better at the point of use: a cucumber.js require: list shows webship-js core steps on one line and @webship-js/diffy-steps on the next, and the relationship is self-evident. version stays 2.0.0; publishConfig.access stays public. Every reference carrying the scope follows - install commands, the node_modules/@webship-js/diffy-steps/... require paths, the copy and uninstall snippets, the doc headings, the step-file header - and package-lock.json is regenerated. Nothing is published yet, so this costs no deprecation, redirect, or consumer migration. The window closes at first publish. Verified: npm pack --dry-run reports @webship-js/diffy-steps@2.0.0, and the suite still passes 6 scenarios / 37 steps against the mock Diffy API. Co-Authored-By: Claude Opus 5 --- README.md | 8 ++++---- docs/README.md | 4 ++-- package-lock.json | 4 ++-- package.json | 2 +- tests/step-definitions/README.md | 10 +++++----- tests/step-definitions/diffy.steps.js | 2 +- 6 files changed, 15 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index 29279cd..23ba807 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,8 @@ -# @webship/diffy-steps +# @webship-js/diffy-steps [![Test](https://github.com/webship/diffy-steps/actions/workflows/test.yml/badge.svg)](https://github.com/webship/diffy-steps/actions/workflows/test.yml) -Diffy-specific Cucumber step definitions for [webship-js](https://www.npmjs.com/package/webship-js) — a Playwright + Cucumber BDD testing framework. `@webship/diffy-steps` adds a `diffy.steps.js` step-pack that captures full-page Playwright screenshots at multiple breakpoints and drives [Diffy](https://diffy.website) visual-regression comparisons through the Diffy REST API, so you can express visual checks as readable Gherkin instead of hand-rolling API calls. +Diffy-specific Cucumber step definitions for [webship-js](https://www.npmjs.com/package/webship-js) — a Playwright + Cucumber BDD testing framework. `@webship-js/diffy-steps` adds a `diffy.steps.js` step-pack that captures full-page Playwright screenshots at multiple breakpoints and drives [Diffy](https://diffy.website) visual-regression comparisons through the Diffy REST API, so you can express visual checks as readable Gherkin instead of hand-rolling API calls. It is a **plugin for webship-js** — it does not run standalone. It ships one file of step definitions; you drop it into an existing (or new) webship-js test project. @@ -27,7 +27,7 @@ See [tests/step-definitions/diffy.steps.js](tests/step-definitions/diffy.steps.j ## Installation ```bash -npm install --save-dev webship-js @webship/diffy-steps +npm install --save-dev webship-js @webship-js/diffy-steps ``` Add both step-definition paths to your project's `cucumber.js`: @@ -37,7 +37,7 @@ module.exports = { default: { require: [ 'node_modules/webship-js/tests/step-definitions/**/*.js', // webship-js core steps - 'node_modules/@webship/diffy-steps/tests/step-definitions/**/*.js', // this plugin + 'node_modules/@webship-js/diffy-steps/tests/step-definitions/**/*.js', // this plugin 'tests/step-definitions/**/*.js', // your own custom steps, if any ], paths: ['tests/features/**/*.feature'], diff --git a/docs/README.md b/docs/README.md index 328bf4a..650f56a 100644 --- a/docs/README.md +++ b/docs/README.md @@ -1,6 +1,6 @@ -# @webship/diffy-steps documentation +# @webship-js/diffy-steps documentation -Per-step reference for the `@webship/diffy-steps` plugin for [webship-js](https://www.npmjs.com/package/webship-js). +Per-step reference for the `@webship-js/diffy-steps` plugin for [webship-js](https://www.npmjs.com/package/webship-js). Start with the [root README](../README.md) for installation, configuration, and the environment-variable table. The [step-definitions README](../tests/step-definitions/README.md) carries the deep reference: the adoption walkthrough, the Diffy REST API endpoint map, the Diffy-side IP allow-list, and links into Diffy's own documentation. diff --git a/package-lock.json b/package-lock.json index f022261..3d0b98e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,11 +1,11 @@ { - "name": "@webship/diffy-steps", + "name": "@webship-js/diffy-steps", "version": "2.0.0", "lockfileVersion": 3, "requires": true, "packages": { "": { - "name": "@webship/diffy-steps", + "name": "@webship-js/diffy-steps", "version": "2.0.0", "license": "MIT", "dependencies": { diff --git a/package.json b/package.json index d744b6a..5061475 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "@webship/diffy-steps", + "name": "@webship-js/diffy-steps", "version": "2.0.0", "description": "Diffy-specific Cucumber step definitions plugin for webship-js — visual-regression testing for any site via the Diffy REST API (Playwright + Cucumber).", "main": "tests/step-definitions/diffy.steps.js", diff --git a/tests/step-definitions/README.md b/tests/step-definitions/README.md index e24d657..a1d9896 100755 --- a/tests/step-definitions/README.md +++ b/tests/step-definitions/README.md @@ -27,7 +27,7 @@ and links into Diffy's own documentation. Install the plugin alongside webship-js: ```bash -npm install --save-dev webship-js @webship/diffy-steps +npm install --save-dev webship-js @webship-js/diffy-steps ``` `diffy.steps.js` pulls in `axios` (a direct dependency of this package) plus @@ -45,7 +45,7 @@ module.exports = { requireModule: ['tsx/cjs'], require: [ 'node_modules/webship-js/tests/step-definitions/**/*.js', - 'node_modules/@webship/diffy-steps/tests/step-definitions/**/*.js', + 'node_modules/@webship-js/diffy-steps/tests/step-definitions/**/*.js', 'tests/step-definitions/**/*.js', ], paths: ['tests/features/**/*.feature'], @@ -126,7 +126,7 @@ option. Start from one of this repository's reference features: ```bash -cp node_modules/@webship/diffy-steps/tests/features/01-example-demo.feature \ +cp node_modules/@webship-js/diffy-steps/tests/features/01-example-demo.feature \ tests/features/my-visual-regression.feature ``` @@ -157,8 +157,8 @@ examples (GitHub Actions, CircleCI, Tugboat, Platform.sh). ### Remove Diffy later (reversible) ```bash -npm uninstall @webship/diffy-steps -# then remove the 'node_modules/@webship/diffy-steps/**' line from cucumber.js require: +npm uninstall @webship-js/diffy-steps +# then remove the 'node_modules/@webship-js/diffy-steps/**' line from cucumber.js require: # and delete your own @diffy feature files. ``` diff --git a/tests/step-definitions/diffy.steps.js b/tests/step-definitions/diffy.steps.js index bb20cc8..67f4fad 100755 --- a/tests/step-definitions/diffy.steps.js +++ b/tests/step-definitions/diffy.steps.js @@ -1,7 +1,7 @@ 'use strict'; // --------------------------------------------------------------------------- -// @webship/diffy-steps — Diffy visual-regression step definitions for webship-js +// @webship-js/diffy-steps — Diffy visual-regression step definitions for webship-js // // Plugin for webship-js (https://www.npmjs.com/package/webship-js): relies on // the World it installs (this.page, this.parameters) and adds nothing to it.