Skip to content

Commit a710aaf

Browse files
chore: update docs for npm directory (#22916)
* chore: add docs to npm directory * Fix binary build failure caused by non-JSON file at `/npm` * chore: simplify docs * revert * fix build Co-authored-by: Mike Plummer <mikep@cypress.io>
1 parent 72078ef commit a710aaf

File tree

3 files changed

+11
-3
lines changed

3 files changed

+11
-3
lines changed

CONTRIBUTING.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -289,10 +289,12 @@ Here is a list of the npm packages in this repository:
289289
| [eslint-plugin-dev](./npm/eslint-plugin-dev) | `@cypress/eslint-plugin-dev` | Eslint plugin for internal development. |
290290
| [mount-utils](./npm/mount-utils) | `@cypress/mount-utils` | Common functionality for Vue/React/Angular adapters. |
291291
| [react](./npm/react) | `@cypress/react` | Cypress component testing for React. |
292+
| [react18](./npm/react18) | `@cypress/react18` | Cypress component testing for React 18. |
292293
| [vite-dev-server](./npm/vite-dev-server) | `@cypress/vite-dev-server` | Vite powered dev server for Component Testing. |
293294
| [webpack-preprocessor](./npm/webpack-preprocessor) | `@cypress/webpack-preprocessor` | Cypress preprocessor for bundling JavaScript via webpack. |
294295
| [webpack-dev-server](./npm/webpack-dev-server) | `@cypress/webpack-dev-server` | Webpack powered dev server for Component Testing. |
295-
| [vue](./npm/vue) | `@cypress/vue` | Cypress component testing for Vue. |
296+
| [vue](./npm/vue) | `@cypress/vue` | Cypress component testing for Vue 3. |
297+
| [vue2](./npm/vue2) | `@cypress/vue2` | Cypress component testing for Vue 2. |
296298

297299
We try to tag all issues with a `pkg/` or `npm/` tag describing the appropriate package the work is required in. For public packages, we use their qualified package name: For example, issues relating to the webpack preprocessor are tagged under [`npm: @cypress/webpack-preprocessor`](https://github.com/cypress-io/cypress/labels/npm%3A%20%40cypress%2Fwebpack-preprocessor) label and issues related to the `driver` package are tagged with the [`pkg/driver`](https://github.com/cypress-io/cypress/labels/pkg%2Fdriver) label.
298300

@@ -513,7 +515,7 @@ The repository is setup with two main (protected) branches.
513515
- `master` is the code already published, both for the main Cypress app and independent npm packages.
514516
- `develop` is the current latest "pre-release" code. This branch is set as the default branch, and all pull requests that update the main Cypress binary should be made against this branch.
515517

516-
In general, we want to publish our standalone npm packages continuously as new features are added. Therefore, any pull requests that only change independent `@cypress/` packages in the [`npm`](./npm) directory should be made directly off the `master` branch. We use [`semantic-release`](https://semantic-release.gitbook.io/semantic-release/) to automatically publish these packages to npm when a PR is merged directly into master.
518+
In general, we want to publish our [standalone npm packages](./npm) continuously as new features are added. Therefore, any pull requests that only change independent `@cypress/` packages in the [`npm`](./npm) directory should be made directly off the `master` branch. We use [`semantic-release`](https://semantic-release.gitbook.io/semantic-release/) to automatically publish these packages to npm when a PR is merged directly into master.
517519

518520
When updating the main Cypress app, pull requests should be made against the `develop` branch. We do not continuously deploy the Cypress binary, so `develop` contains all of the new features and fixes that are staged to go out in the next update of the main Cypress app. In addition, if you make changes to an npm package that can't be published until the binary is also updated, you should make a pull request against the `develop` branch.
519521

npm/README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# npm
2+
3+
This directory contains packages that are both used internally inside the Cypress monorepo [`packages`](../packages) and also published independently on npm under the Cypress organization using the `@cypress` prefix. For example, `vite-dev-server` is published as `@cypress/vite-dev-server`.
4+
5+
These are automatically released based on [Semantic Version](https://semver.org) commit message prefixes (`feat`, `chore` etc). A package is automatically released when changes are merged into master. You can read more about this process in [`CONTRIBUTING`](../CONTRIBUTING.md#committing-code).
6+

scripts/binary/util/packages.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ export async function copyAllToDist (distDir: string) {
6868
// but without all negated files ("!src/**/*.spec.js" for example)
6969
// and default included paths
7070
// and convert to relative paths
71-
const pkgFileMasks = [].concat(json.files || []).concat(json.main || [])
71+
const pkgFileMasks = [].concat(json?.files || []).concat(json?.main || [])
7272

7373
debug('for pkg %s have the following file masks %o', pkg, pkgFileMasks)
7474
let foundFileRelativeToPackageFolder = []

0 commit comments

Comments
 (0)