RuleStack

Configs

Stacks

Compare

Diff

RuleStack

Configs

Stacks

Compare

Diff

Read API

RuleStack

Configs

Stacks

Compare

Diff

Read API

Diff/contentstack-contentstack-javascript-cursor-rules-testing ↔ contentstack-contentstack-javascript-agents

Comparison

A · Cursor rules · contentstack/contentstack-javascriptB · AGENTS.md · contentstack/contentstack-javascript
What each file covers, counted
DimensionSharedOnly in AOnly in BOverlap
Sections0660%
Commands41257%
Section tags33333%

What each file covers

Sections

0 shared · 6 only in A · 6 only in B
  • − Testing — `contentstack` (CDA)
  • − Frameworks
  • − Env & live stack
  • − Layout
  • − Hygiene
  • − Coverage
  • + Contentstack JavaScript Delivery SDK – Agent guide
  • + What this repo is
  • + Tech stack (at a glance)
  • + Commands (quick reference)
  • + Where the documentation lives: skills
  • + Using Cursor (optional)

Commands

4 shared · 1 only in A · 2 only in B
  • − npm run test:typescript
  • + npm run lint
  • + npm-publish.yml
  •   jest.js.config.js
  •   jest.config.js
  •   npm test
  •   npm run build

Section tags

3 shared · 3 only in A · 3 only in B
  • − architecture
  • − testing-strategy
  • − do-not
  • + lint-format
  • + agent-behaviour
  • + docs
  •   build
  •   test
  •   code-style

Line diff

+32 added−25 removed12 unchanged27.3% identical
contentstack/contentstack-javascript · .cursor/rules/testing.mdc
@@ −1 @@
1---
2description: "Jest e2e and TypeScript tests for the CDA SDK"
3globs:
4 - "test/**/*.js"
5 - "test/**/*.ts"
6alwaysApply: false
7---
8 
9# Testing — `contentstack` (CDA)
10 
11## Frameworks
12 
13| Suite | Runner | Notes |
14|-------|--------|--------|
15| **JS e2e / integration-style** | **Jest** (`jest.js.config.js`) | `testMatch`: `**/test/**/*.js`; ignores `test/index.js`, `test/config.js`, `test/sync_config.js`, some `utils.js` paths |
16| **TypeScript** | **Jest** + **ts-jest** (`jest.config.js`) | `npm run test:typescript`; `test/typescript/**/*.test.ts` |
 
17 
18## Env & live stack
19 
20- **Canonical required vars** for suites that `require('./config')` or `require('../config.js')`: **`HOST`**, **`API_KEY`**, **`DELIVERY_TOKEN`**, **`ENVIRONMENT`** — validated in **`test/config.js`** (loads **dotenv**). Missing any variable throws on import.
21- Use a **`.env`** file locally; do not commit secrets. **`HOST`** should match the delivery API host for your stack/region.
22- Built SDK: many tests **`require('../../dist/node/contentstack.js')`**. **`npm test`** runs **`pretest`** → **`npm run build`** first.
 
 
 
 
23 
24## Layout
25 
26- **Suite entry (JS):** `test/index.js` `require`s individual test files.
27- **TypeScript:** colocate under **`test/typescript/`** with `*.test.ts` naming.
 
 
 
28 
29## Hygiene
30 
31- No committed **`only`** / **`skip`** for tests that must run in CI.
32- Prefer deterministic assertions; mock or scope live tests when adding new cases so CI behavior stays predictable if env is absent.
 
 
 
 
 
33 
34## Coverage
35 
36- Jest / reporter config is in **`jest.js.config.js`** and **`jest.config.js`**; HTML reports paths are configured there.
37 
contentstack/contentstack-javascript · AGENTS.md
@@ +1 @@
1# Contentstack JavaScript Delivery SDK – Agent guide
 
 
 
 
 
 
2 
3**Universal entry point** for contributors and AI agents. Detailed conventions live in **`skills/*/SKILL.md`**.
4 
5## What this repo is
6 
7| Field | Detail |
8|--------|--------|
9| **Name:** | [contentstack-javascript](https://github.com/contentstack/contentstack-javascript) (npm package **`contentstack`**) |
10| **Purpose:** | Legacy **JavaScript** Content Delivery SDK for browsers, Node.js, React Native, and NativeScript—stack initialization, queries, entries, assets. |
11| **Out of scope:** | Not the TypeScript-first **`@contentstack/delivery-sdk`** (`contentstack-typescript`); new TypeScript projects should prefer that package when appropriate. |
12 
13## Tech stack (at a glance)
14 
15| Area | Details |
16|------|---------|
17| Language | JavaScript in **`src/`**; TypeScript tests via Jest (`test/typescript`) |
18| Build | Webpack configs under **`webpack/`**; outputs under **`dist/`** per target (`npm run build`) |
19| Tests | Jest: **`test:e2e`** (`jest.js.config.js`) and **`test:typescript`** (`jest.config.js`); **`pretest`** runs **`build`** first |
20| Lint / coverage | ESLint on `src` and `test` (`npm run lint`) |
21| CI | `.github/workflows/check-branch.yml`, `npm-publish.yml`, `sca-scan.yml`, `policy-scan.yml`, `codeql-analysis.yml`, `link-check.yml`, `issues-jira.yml` |
22 
23## Commands (quick reference)
24 
25| Command type | Command |
26|--------------|---------|
27| Build | `npm run build` |
28| Test | `npm test` (build via `pretest`, then e2e + TypeScript Jest suites) |
29| Lint | `npm run lint` |
30 
31## Where the documentation lives: skills
32 
33| Skill | Path | What it covers |
34|-------|------|----------------|
35| **Development workflow** | [`skills/dev-workflow/SKILL.md`](skills/dev-workflow/SKILL.md) | Branches, npm scripts, Husky, CI |
36| **JavaScript SDK** | [`skills/contentstack-javascript-sdk/SKILL.md`](skills/contentstack-javascript-sdk/SKILL.md) | Public API (`Stack`, regions), `@contentstack/utils` |
37| **JavaScript tooling** | [`skills/javascript/SKILL.md`](skills/javascript/SKILL.md) | Webpack targets, `dist/` layout, Babel |
38| **Testing** | [`skills/testing/SKILL.md`](skills/testing/SKILL.md) | Jest configs, e2e vs TypeScript tests |
39| **Code review** | [`skills/code-review/SKILL.md`](skills/code-review/SKILL.md) | PR checklist |
40 
41## Using Cursor (optional)
42 
43If you use **Cursor**, [`.cursor/rules/README.md`](.cursor/rules/README.md) only points to **`AGENTS.md`**—same docs as everyone else.
44 
@@ −1 +1 @@
1−---
2−description: "Jest e2e and TypeScript tests for the CDA SDK"
3−globs:
4− - "test/**/*.js"
5− - "test/**/*.ts"
6−alwaysApply: false
7−---
1+# Contentstack JavaScript Delivery SDK – Agent guide
82  
9−# Testing — `contentstack` (CDA)
3+**Universal entry point** for contributors and AI agents. Detailed conventions live in **`skills/*/SKILL.md`**.
104  
11−## Frameworks
5+## What this repo is
126  
13−| Suite | Runner | Notes |
14−|-------|--------|--------|
15−| **JS e2e / integration-style** | **Jest** (`jest.js.config.js`) | `testMatch`: `**/test/**/*.js`; ignores `test/index.js`, `test/config.js`, `test/sync_config.js`, some `utils.js` paths |
16−| **TypeScript** | **Jest** + **ts-jest** (`jest.config.js`) | `npm run test:typescript`; `test/typescript/**/*.test.ts` |
7+| Field | Detail |
8+|--------|--------|
9+| **Name:** | [contentstack-javascript](https://github.com/contentstack/contentstack-javascript) (npm package **`contentstack`**) |
10+| **Purpose:** | Legacy **JavaScript** Content Delivery SDK for browsers, Node.js, React Native, and NativeScript—stack initialization, queries, entries, assets. |
11+| **Out of scope:** | Not the TypeScript-first **`@contentstack/delivery-sdk`** (`contentstack-typescript`); new TypeScript projects should prefer that package when appropriate. |
1712  
18−## Env & live stack
13+## Tech stack (at a glance)
1914  
20−- **Canonical required vars** for suites that `require('./config')` or `require('../config.js')`: **`HOST`**, **`API_KEY`**, **`DELIVERY_TOKEN`**, **`ENVIRONMENT`** — validated in **`test/config.js`** (loads **dotenv**). Missing any variable throws on import.
21−- Use a **`.env`** file locally; do not commit secrets. **`HOST`** should match the delivery API host for your stack/region.
22−- Built SDK: many tests **`require('../../dist/node/contentstack.js')`**. **`npm test`** runs **`pretest`** → **`npm run build`** first.
15+| Area | Details |
16+|------|---------|
17+| Language | JavaScript in **`src/`**; TypeScript tests via Jest (`test/typescript`) |
18+| Build | Webpack configs under **`webpack/`**; outputs under **`dist/`** per target (`npm run build`) |
19+| Tests | Jest: **`test:e2e`** (`jest.js.config.js`) and **`test:typescript`** (`jest.config.js`); **`pretest`** runs **`build`** first |
20+| Lint / coverage | ESLint on `src` and `test` (`npm run lint`) |
21+| CI | `.github/workflows/check-branch.yml`, `npm-publish.yml`, `sca-scan.yml`, `policy-scan.yml`, `codeql-analysis.yml`, `link-check.yml`, `issues-jira.yml` |
2322  
24−## Layout
23+## Commands (quick reference)
2524  
26−- **Suite entry (JS):** `test/index.js` `require`s individual test files.
27−- **TypeScript:** colocate under **`test/typescript/`** with `*.test.ts` naming.
25+| Command type | Command |
26+|--------------|---------|
27+| Build | `npm run build` |
28+| Test | `npm test` (build via `pretest`, then e2e + TypeScript Jest suites) |
29+| Lint | `npm run lint` |
2830  
29−## Hygiene
31+## Where the documentation lives: skills
3032  
31−- No committed **`only`** / **`skip`** for tests that must run in CI.
32−- Prefer deterministic assertions; mock or scope live tests when adding new cases so CI behavior stays predictable if env is absent.
33+| Skill | Path | What it covers |
34+|-------|------|----------------|
35+| **Development workflow** | [`skills/dev-workflow/SKILL.md`](skills/dev-workflow/SKILL.md) | Branches, npm scripts, Husky, CI |
36+| **JavaScript SDK** | [`skills/contentstack-javascript-sdk/SKILL.md`](skills/contentstack-javascript-sdk/SKILL.md) | Public API (`Stack`, regions), `@contentstack/utils` |
37+| **JavaScript tooling** | [`skills/javascript/SKILL.md`](skills/javascript/SKILL.md) | Webpack targets, `dist/` layout, Babel |
38+| **Testing** | [`skills/testing/SKILL.md`](skills/testing/SKILL.md) | Jest configs, e2e vs TypeScript tests |
39+| **Code review** | [`skills/code-review/SKILL.md`](skills/code-review/SKILL.md) | PR checklist |
3340  
34−## Coverage
41+## Using Cursor (optional)
3542  
36−- Jest / reporter config is in **`jest.js.config.js`** and **`jest.config.js`**; HTML reports paths are configured there.
43+If you use **Cursor**, [`.cursor/rules/README.md`](.cursor/rules/README.md) only points to **`AGENTS.md`**—same docs as everyone else.
3744  
RuleStack

Built by

Kynth Studio

Directory

Configs
Stacks
Compare formats
Diff two configs
Best AGENTS.md examples

Formats

AGENTS.md
CLAUDE.md
Cursor rules
Copilot instructions

Reference

Read API
Corpus health
Privacy Policy
Terms

RuleStack

RuleStack

Built by

Kynth Studio

Directory

Configs
Stacks
Compare formats
Diff two configs
Best AGENTS.md examples

Formats

AGENTS.md
CLAUDE.md
Cursor rules
Copilot instructions

Reference

Read API
Corpus health
Privacy Policy
Terms

RuleStack

RuleStack

Built by

Kynth Studio

Directory

Configs
Stacks
Compare formats
Diff two configs
Best AGENTS.md examples

Formats

AGENTS.md
CLAUDE.md
Cursor rules
Copilot instructions

Reference

Read API
Corpus health
Privacy Policy
Terms

RuleStack