Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
* text eol=lf
*.pdf binary
*.png binary
18 changes: 18 additions & 0 deletions .github/workflows/release-github.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Release GitHub

on:
push:
branches: [release/*]

jobs:
create-github-release:
name: Create GitHub Release and Git tag
runs-on: ubuntu-latest
environment: Release
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- uses: cucumber/action-create-github-release@v1.1.1
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
24 changes: 24 additions & 0 deletions .github/workflows/release-npm.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Release NPM

on:
push:
branches: [release/*]

jobs:
publish-npm:
name: Publish NPM module
runs-on: ubuntu-latest
environment: Release
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '22.x'
cache: 'npm'
cache-dependency-path: package-lock.json
- run: npm ci
- run: npm run build
- uses: cucumber/action-publish-npm@v1.1.1
with:
npm-token: ${{ secrets.NPM_TOKEN }}
npm-tag: 'latest'
35 changes: 35 additions & 0 deletions .github/workflows/site.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Site

on:
push:
branches:
- main

jobs:
upload-artifact:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 22.x
- run: npm ci
- run: npm run docs
- run: |
chmod -c -R +rX "_site/" | while read line; do
echo "::warning title=Invalid file permissions automatically fixed::$line"
done
- uses: actions/upload-pages-artifact@v3

deploy:
needs: upload-artifact
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- id: deployment
uses: actions/deploy-pages@v4
56 changes: 56 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Test

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os:
- ubuntu-latest
- macos-latest
- windows-latest
node-version: [20.x, 22.x, 24.x]
fail-fast: false

steps:
- uses: actions/checkout@v4
- name: with Node.js ${{ matrix.node-version }} on ${{ matrix.os }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- run: npm ci
- run: npm run lint
- run: npm run build
- run: npm test

coverage:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 24.x
- run: npm ci
- run: npm run build
- run: npm run coverage:check

exports:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 24.x
- run: npm ci
- run: npm run build
- run: npm run exports:check
141 changes: 4 additions & 137 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,139 +1,6 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*

# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
_site
coverage
*.lcov

# nyc test coverage
.nyc_output

# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
jspm_packages/

# Snowpack dependency directory (https://snowpack.dev/)
web_modules/

# TypeScript cache
*.tsbuildinfo

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional stylelint cache
.stylelintcache

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variable files
.env
.env.*
!.env.example

# parcel-bundler cache (https://parceljs.org/)
.cache
.parcel-cache

# Next.js build output
.next
out

# Nuxt.js build / generate output
.nuxt
dist

# Gatsby files
.cache/
# Comment in the public line in if your project uses Gatsby and not Next.js
# https://nextjs.org/blog/next-9-1#public-directory-support
# public

# vuepress build output
.vuepress/dist

# vuepress v2.x temp and cache directory
.temp
.cache

# Sveltekit cache directory
.svelte-kit/

# vitepress build output
**/.vitepress/dist

# vitepress cache directory
**/.vitepress/cache

# Docusaurus cache and generated files
.docusaurus

# Serverless directories
.serverless/

# FuseBox cache
.fusebox/

# DynamoDB Local files
.dynamodb/

# Firebase cache directory
.firebase/

# TernJS port file
.tern-port

# Stores VSCode versions used for testing VSCode extensions
.vscode-test

# yarn v3
.pnp.*
.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/sdks
!.yarn/versions

# Vite logs files
vite.config.js.timestamp-*
vite.config.ts.timestamp-*
node_modules
tmp
tsdoc-metadata.json
5 changes: 5 additions & 0 deletions .mocharc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"require": "ts-node/register",
"extension": ["ts"],
"recursive": true
}
6 changes: 6 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"trailingComma": "es5",
"semi": false,
"singleQuote": true,
"printWidth": 100
}
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2025 Cucumber
Copyright (c) 2025 David Goss and contributors

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
16 changes: 15 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,15 @@
# javascript-core
<h1 align="center">
<img alt="" width="75" src="https://github.com/cucumber.png"/>
<br>
javascript-core
</h1>
<p align="center">
<b>Core test case composition library for building a Cucumber implementation</b>
</p>

<p align="center">
<a href="https://www.npmjs.com/package/@cucumber/core" style="text-decoration: none"><img src="https://img.shields.io/npm/v/@cucumber/core?style=flat&color=dark-green" alt="Latest version on npm"></a>
<a href="https://github.com/cucumber/javascript-core/actions" style="text-decoration: none"><img src="https://github.com/cucumber/javascript-core/actions/workflows/test.yaml/badge.svg" alt="Build status"></a>
</p>

This library provides helpers for taking pickles and support code and turning them into executable test cases.
1 change: 1 addition & 0 deletions RELEASING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
See [.github/RELEASING](https://github.com/cucumber/.github/blob/main/RELEASING.md).
33 changes: 33 additions & 0 deletions api-extractor.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
"mainEntryPointFilePath": "<projectFolder>/dist/index.d.ts",
"compiler": {},
"apiReport": {
"enabled": true,
"reportFolder": "<projectFolder>",
"reportTempFolder": "<projectFolder>/tmp",
"reportFileName": "cucumber-core"
},
"docModel": {
"enabled": false
},
"dtsRollup": {
"enabled": false
},
"messages": {
"extractorMessageReporting": {
"ae-forgotten-export": {
"logLevel": "warning",
"addToApiReportFile": false
}
},
"tsdocMessageReporting": {
"tsdoc-undefined-tag": {
"logLevel": "none"
},
"tsdoc-escape-greater-than": {
"logLevel": "none"
}
}
}
}
Loading
Loading