@gitlab/frontend-tests 0.1.4 → 0.1.5-rc.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +12 -10
  2. package/package.json +13 -16
package/README.md CHANGED
@@ -5,23 +5,23 @@ Reusable test infrastructure for GitLab-owned frontend packages. It includes a s
5
5
  ## Installation
6
6
 
7
7
  ```sh
8
- yarn add --dev @gitlab/frontend-tests
8
+ pnpm add -D @gitlab/frontend-tests
9
9
  ```
10
10
 
11
11
  ## Development
12
12
 
13
- The package is written in TypeScript and built with rollup. Tests use vitest. Linting uses ESLint 9 with a flat config and typescript-eslint.
13
+ The package is written in TypeScript and built with rollup. Tests use Rstest. Linting uses ESLint 9 with a flat config and typescript-eslint.
14
14
 
15
- `tsconfig.json` is the editor and `yarn typecheck` config and covers the tests. `tsconfig.build.json` extends it for rollup and excludes the tests so they stay out of `dist/`.
15
+ `tsconfig.json` is the editor and `pnpm typecheck` config and covers the tests. `tsconfig.build.json` extends it for rollup and excludes the tests so they stay out of `dist/`.
16
16
 
17
17
  Relative imports in `src/` carry a `.js` extension (`./types.js`), which TypeScript maps to the `.ts` source. The emitted `.d.ts` files keep those specifiers, which `node16` module resolution requires. After rollup, `scripts/emit_cjs_types.mjs` copies every `.d.ts` to a `.d.cts` twin for the `require` export condition, so CommonJS TypeScript consumers resolve types too. `lodash-es` is bundled into `dist/` because it ships ESM only; the only runtime dependency is `@whatwg-node/fetch`.
18
18
 
19
19
  ```sh
20
- yarn install # install dependencies
21
- yarn test # run tests
22
- yarn build # build dist/ (ESM, CJS and .d.ts)
23
- yarn lint # run ESLint
24
- yarn typecheck # run tsc --noEmit
20
+ pnpm install # install dependencies
21
+ pnpm test # run tests
22
+ pnpm build # build dist/ (ESM, CJS and .d.ts)
23
+ pnpm lint # run ESLint
24
+ pnpm typecheck # run tsc --noEmit
25
25
  ```
26
26
 
27
27
  ## Adding a module
@@ -96,7 +96,9 @@ To release:
96
96
  1. Merge your changes to `main`.
97
97
  2. Create and push a tag `vX.Y.Z` on `main`.
98
98
 
99
- The tag pipeline publishes the package. The `publish` job sets `version` in `package.json` from the tag before publishing, so no version-bump merge request is needed. Releases do not update the committed `version`; the tag is authoritative.
99
+ The tag pipeline publishes the package. The `publish` job sets `version` in `package.json` from the tag before publishing, so no version-bump merge request is needed. Releases do not update the committed `version`; the tag is authoritative. `package.json` carries the placeholder `0.0.0-development`, which is never published. Do not bump it by hand. To check what is released, run `npm view @gitlab/frontend-tests version`, or look at the latest release on the project overview.
100
+
101
+ After `publish` succeeds, the `release` job creates a GitLab release for the tag, with a one-line description and a link to the npm package. It does not run if `publish` fails, so a release always means the version is on npm.
100
102
 
101
103
  Tags must be `vMAJOR.MINOR.PATCH`, with an optional prerelease suffix (for example `v1.0.0-rc.1`), or the `publish` job fails. Stable versions are published with the `latest` dist-tag; prerelease versions (those containing `-`) use the `next` dist-tag so they do not replace the stable release for consumers installing without a version or tag.
102
104
 
@@ -106,7 +108,7 @@ This is required before the first CI publish. Someone with publish rights on the
106
108
 
107
109
  1. Publish the first version by hand from a logged-in machine with `npm publish --access public`. The trusted publisher is set on an existing package's settings on npmjs.com, so the package must exist first.
108
110
  2. On npmjs.com, open the package Settings and find the Trusted Publisher section. Choose GitLab CI/CD and enter:
109
- - Namespace: `gitlab-org/frontend`
111
+ - Namespace: `gitlab-org/frontend/toolkit`
110
112
  - Project name: `tests`
111
113
  - Top-level CI file path: `.gitlab-ci.yml`
112
114
  - Allow `npm publish`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gitlab/frontend-tests",
3
- "version": "0.1.4",
3
+ "version": "0.1.5-rc.1",
4
4
  "description": "Reusable test infrastructure for GitLab frontend packages",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -90,14 +90,6 @@
90
90
  "integration.js",
91
91
  "integration"
92
92
  ],
93
- "scripts": {
94
- "build": "rollup -c && node scripts/emit_cjs_types.mjs",
95
- "test": "vitest run",
96
- "test:watch": "vitest",
97
- "lint": "eslint src/",
98
- "typecheck": "tsc --noEmit",
99
- "prepublishOnly": "yarn build"
100
- },
101
93
  "dependencies": {
102
94
  "@whatwg-node/fetch": "^0.10.11"
103
95
  },
@@ -111,31 +103,36 @@
111
103
  }
112
104
  },
113
105
  "devDependencies": {
114
- "@eslint/js": "^9.0.0",
106
+ "@gitlab/frontend-config": "^0.1.1",
115
107
  "@jest/types": "^30.5.1",
116
108
  "@rollup/plugin-commonjs": "^29.0.3",
117
109
  "@rollup/plugin-node-resolve": "^16.0.3",
118
110
  "@rollup/plugin-typescript": "^12.3.0",
111
+ "@rstest/core": "^0.12.5",
119
112
  "@types/lodash-es": "^4.17.12",
120
113
  "@types/node": "^20",
121
114
  "eslint": "^9.0.0",
122
- "globals": "^17.7.0",
123
115
  "lodash-es": "^4.17.23",
124
116
  "msw": "^2.15.0",
125
117
  "rollup": "^4.0.0",
126
118
  "tslib": "^2.8.1",
127
- "typescript": "~5.8.0",
128
- "typescript-eslint": "^8.71.0",
129
- "vitest": "^3.0.0"
119
+ "typescript": "~5.8.0"
130
120
  },
131
121
  "engines": {
132
122
  "node": ">=20"
133
123
  },
134
124
  "repository": {
135
125
  "type": "git",
136
- "url": "https://gitlab.com/gitlab-org/frontend/tests"
126
+ "url": "https://gitlab.com/gitlab-org/frontend/toolkit/tests"
137
127
  },
138
128
  "publishConfig": {
139
129
  "registry": "https://registry.npmjs.org/"
130
+ },
131
+ "scripts": {
132
+ "build": "rollup -c && node scripts/emit_cjs_types.mjs",
133
+ "test": "rstest",
134
+ "test:watch": "rstest watch",
135
+ "lint": "eslint src/",
136
+ "typecheck": "tsc --noEmit"
140
137
  }
141
- }
138
+ }