Releases: x-name15/smile
Releases · x-name15/smile
Release list
v1.4.4: GraphQL Naming Conventions
Added
- New GraphQL Rule:
require-pascal-case-types: Added strict naming convention rule for GraphQL types (Object, Input, Interface, Enum, Union) to require PascalCase. - New GraphQL Rule:
require-camel-case-fields: Added strict naming convention rule for GraphQL fields to require camelCase.
Chore
- CI/CD Hardening: Added
semantic-pr.ymlto strictly enforce conventional commits on all Pull Requests. - Security Scanning: Added
codeql.ymlto automatically run GitHub CodeQL SAST scans on every push to main and weekly schedules.
📦 Installation
npm install -g @mrjacket/smileView Full CHANGELOG
v1.4.3: GraphQL Runtime Validation & OpenAPI Hardening
Added
- GraphQL Runtime Validation: Extends the Breaching Detector (
smile test) to natively support GraphQL schemas. It parses.graphqlSDL files, automatically generates shallow queries (using__typename) for parameter-less endpoints on theQueryroot type, dispatches them via POST, and verifies the response structure is free of GraphQL errors. - New OpenAPI Rule:
valid-examples: Added strict static validation for OpenAPI examples. If you declare a schema property (e.g.,type: integer) and provide an example that violates it (e.g.,example: "foo"),smilewill now block the build. - New OpenAPI Rule:
require-security: Added strict static validation enforcing that every endpoint either has asecurityrequirement defined globally/locally, or explicitly overrides it to public usingsecurity: []. Prevents accidental exposure of unprotected APIs. - New OpenAPI Rule:
no-http-verbs-in-path: Added a REST best-practice rule that triggers warnings if paths contain verbs (e.g.,/getUsers,/createOrder).
Chore
- Dependabot Configuration: Added
.github/dependabot.ymlfor automated dependency updates on a weekly schedule.
📦 Installation
npm install -g @mrjacket/smileView Full CHANGELOG
v1.4.2: Full Breaching Detector & Postman Runtime Validation
Added
- OpenAPI
POST/PUT/PATCH/DELETEValidation: The Breaching Detector (smile test) now supports state-mutating requests. It automatically generates valid JSON bodies forPOST/PUT/PATCHrequests by analyzing the OpenAPI schema. - Postman Runtime Validation: The Breaching Detector can now recursively traverse Postman collections, fire requests against the live server, and dynamically infer a structural JSON Schema from the saved example to validate the real server's response.
- Runtime Dispatcher Architecture: Refactored
smokeTest.tsinto a clean format-based dispatcher that delegates toopenapiTester.tsandpostmanTester.ts.
Changed
- Warning Toleration:
smile testnow properly ignores warnings (such as204 No Contentmissing a schema) and correctly exits with code0as long as there are no Error-level violations.
Docs
- Destructive Warnings: Added prominent warnings to
README.md,docs/getting-started.md, anddocs/library.mdexplicitly stating thatsmile testnow modifies databases with fake data. - Roadmap: Updated roadmap, pushing AsyncAPI broker validation to v1.6.0.
📦 Installation
npm install -g @mrjacket/smileView Full CHANGELOG
v1.4.1: Hardening & Stability
Fixed
- detectSpecFormat fallback: When a file format cannot be determined, it now returns
ESpecFormat.Unknownand displays a clear error message, rather than silently falling back to parsing as OpenAPI and generating confusing parser errors. - Postman typings: Replaced all usages of
any[]in Postman rules with the newIPostmanIteminterface, ensuring type safety against malformed collection JSONs. - Postman interfaces moved: Moved all Postman type definitions (
IPostmanCollection,IPostmanItem, etc.) to the centralsrc/models/index.tsfile and added comprehensive TSDocs. - Deduce interactive auto-fixer: Hardened
smile deduceto abort gracefully if run against unsupported formats (like gRPC, Postman, GraphQL). Added guard checks to prevent crashes when JSON structures lack apathsobject.
Tests
- gRPC stress testing: Added
sample-grpc-large.proto, a real-world multi-service fixture with nested types and enums, to ensureprotobufjsrules scale gracefully. - OpenAPI stress testing: Added
sample-openapi-large.yamlwith 50 endpoints to ensure fast AST generation and linting.
📦 Installation
npm install -g @mrjacket/smileView Full CHANGELOG
v1.4.0: gRPC and Postman Support
Added
- gRPC (.proto) Linting: Introduced native static linting for Protocol Buffers using
protobufjs(new runtime dependency). - gRPC Native Rules: Added
require-rpc-comments,pascal-case-messages, andcamel-case-fields. - Postman Collections Linting: Introduced native static linting for Postman Collections (
v2.0.0andv2.1.0). - Postman Native Rules: Added
require-request-description,no-empty-folders, andrequire-response-example. - New Exported Functions:
lintGrpcSpecandlintPostmanSpecare now fully exported from the library API. - New Fixtures: Added
fixtures/sample-grpc.proto,fixtures/sample-grpc-clean.proto,fixtures/sample-postman.json, andfixtures/sample-postman-clean.jsonfor testing.
Fixed
- gRPC Parser bug:
protobufjswas loaded withoutalternateCommentMode: true, causing all method comments to be silently ignored. Therequire-rpc-commentsrule was firing on every method indiscriminately. Fixed by enablingalternateCommentModeinsrc/parsers/grpc.ts. - Interface inconsistency:
src/parsers/grpc.tsandsrc/parsers/postman.tswere returning custom interfaces (IGrpcParsedResult,IPostmanParsedResult) instead of the standard project interfaceIParsedSpec. Refactored to use the shared interface for consistency. - TypeScript type assertion: Added proper
as protobuf.Rootandas IPostmanCollectioncasts insrc/core/index.tsafter standardizing parsers toIParsedSpec, fixing TS2345 errors on build. - npm keywords: Added missing
grpc,protobuf,postman, andgraphqlkeywords topackage.json.
Tests
- gRPC test suite expanded:
lintGrpc.test.tswent from 1 test to 9 tests. Now matches the depth of OpenAPI/AsyncAPI suites: broken spec tests per rule (with specific message assertions), format detection, required fields check, and a full clean-spec passing test. - Postman test suite expanded:
lintPostman.test.tswent from 1 test to 10 tests. Includes a negative test verifying that a well-formed request (Get Users) does NOT trigger false positives. - detectSpecFormat tests: Added coverage for
.protoand Postman Collection detection.
Docs
- New:
docs/rules/grpc.md— full rules reference for gRPC in the same style asopenapi.md(with Triggers on / Clean examples for each rule). - New:
docs/rules/postman.md— full rules reference for Postman in the same style asopenapi.md. - Updated:
docs/README.md— added gRPC and Postman to the Rules Reference table. - Updated:
README.md— Features list now includes gRPC, Postman, and the Plugin System. Supported formats line now includes.proto. Rules Reference links updated. Roadmap updated to remove already-shipped 1.4.0 items.
📦 Installation
npm install -g @mrjacket/smileView Full CHANGELOG
v1.3.1: CLI Plugin Flag
Added
- CLI Plugin Injection: Added the
-p, --plugin <path>flag to thelintandtestCLI commands. You can now load custom rules on the fly directly from the terminal without having to modifyconfig.smile.json(e.g.,smile lint ./api.yaml --plugin ./my-plugin.js).
Docs
- CLI Options: Explicitly listed CLI options (
--format,--quiet,--plugin,--header) indocs/getting-started.md. - Documentation Hub: Completely revamped
docs/README.mdto act as an organized hub linking all new guides (Plugins, Library API, Configuration, CI/CD).
📦 Installation
npm install -g @mrjacket/smileView Full CHANGELOG
v1.3.0: The Plugin System
Added
- Plugin System: Enterprise teams can now inject their own JavaScript/TypeScript custom rules dynamically at runtime via
config.smile.json.- Plugins can be loaded via relative paths (
./my-rules.js) or NPM packages (smile-plugin-enterprise). - Custom rules can target specific formats (e.g.
openapi) or apply universally to all formats using"all". - Added new
pluginsarray property to the configuration file format.
- Plugins can be loaded via relative paths (
Docs
- Plugin Guide: Created a dedicated
docs/plugins.mdexplaining how to build and inject custom rules. - Boilerplate: Added a ready-to-use boilerplate plugin in
examples/my-custom-plugin.js.
Chore
- Test Fixtures Isolation: Migrated all internal
.yamltest files from theexamples/folder to a dedicatedfixtures/directory. Theexamples/folder is now strictly reserved for clean, production-ready boilerplate code. Evaluated and refactored the entiresrc/core/__tests__suite to point to the new directory safely.
📦 Installation
npm install -g @mrjacket/smileView Full CHANGELOG
v1.2.5: CI/CD & Flexibility Patch
Added
- GitHub Step Summaries:
smile lintandsmile testnow automatically detect if they are running inside GitHub Actions. If so, they will silently append a beautiful Markdown table of the results to$GITHUB_STEP_SUMMARY, giving you native visual dashboards on your PRs! - Inline Suppressions: Added support for
# smile-ignore-next-line <ruleId>in YAML specifications. This allows developers to bypass specific rules on a case-by-case basis using AST parsing without polluting the globalconfig.smile.json. - JUnit XML Reports: Added native support for JUnit format (
--format junit). Bothsmile lintandsmile testcan now output XML reports that are perfectly digestible by GitLab CI, Jenkins, SonarQube, and Bitbucket. - Quiet Mode: Added a
-q, --quietflag to suppress all CLI spam (ASCII art, progress spinners, success messages) in CI environments, printing only errors and machine-readable formats.
Changed
- Reporters Refactor: Refactored the internal
smileReporter.tsinto a cleaner, multi-file module architecture without impacting the public API.
Fixed
- Documentation Overhaul: Conducted a massive review of the
docs/directory to ensure complete parity with the1.2.5codebase.- Created a dedicated
docs/ci-cd.mdguide centralizing all DevOps capabilities (GitHub Actions, GitLab CI, JUnit, Webhooks, Pre-commit). - Fixed outdated references to
smile smokeacross all files, updating them to the correctsmile testcommand. - Updated
library.mdwith accurate TypeScript types forrunSmokeTest(now returningITestResultand accepting custom HTTP headers). - Cleaned up
getting-started.mdandREADME.mdto point seamlessly to the new CI/CD guide.
- Created a dedicated
📦 Installation
npm install -g @mrjacket/smileView Full CHANGELOG
v1.2.4: Documentation Patch
Fixed
- Documentation Sync: Updated
README.mdand CLI documentation to correctly reflect the newsmile deducecommand name (formerly known asdoctor) to ensurenpmdisplays the correct documentation on the registry.
📦 Installation
npm install -g @mrjacket/smileView Full CHANGELOG
v1.2.3: More Developer Experience :D
Added
- Smile Deduce: Added an interactive
smile deduce <spec>command (The Mentalist auto-fixer!). It reads your specification, finds violations (like missing summaries or operation IDs), and interactively prompts you to fix them right in your terminal. It safely manipulates your YAML files using AST parsing, preserving all# commentsand formatting! - Markdown Reports: Added
--format markdownflag for CI/CD integrations. Outputs GitHub-friendly tables that you can pipe directly into Pull Request comments. - Pre-commit Hook Installer: Added the
smile install-hookcommand to generate a native, zero-dependency git pre-commit hook that automatically blocks commits if the API contract is broken. - Configurable Test Headers: Added
testHeaderstoconfig.smile.json. You can now store your Bearer tokens or API keys globally instead of typing-Hrepeatedly insmile test.
Changed
- CLI Architecture Refactor: Moved all command files (
initCommand,hookCommand,deduceCommand) into a dedicatedsrc/cli/commands/directory for better maintainability.
Fixed
- Init Config Scaffold:
smile initnow correctly generates stubs for advanced config options (testHeaders,format,webhooks) inside the generatedconfig.smile.jsonso users know they are available.
📦 Installation
npm install -g @mrjacket/smileView Full CHANGELOG