Socket
Socket
Sign inDemoInstall

@wixc3/docs

Package Overview
Dependencies
Maintainers
65
Versions
58
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@wixc3/docs - npm Package Compare versions

Comparing version 3.0.5 to 3.0.7

5

dist/cjs/validate-examples.js

@@ -31,3 +31,3 @@ "use strict";

const [ma, mb] = [a, b].map((code) => (0, prettier_1.format)((code || '')
.split(/\r?\n\s*/)
.split(/\r?\n\s*\*?\s*/)
.filter((i) => i)

@@ -41,4 +41,3 @@ .join('\n') || '', { parser: 'typescript' }));

if (docs) {
for (const [_all, type, ref, example] of docs.matchAll(/@example\s*\*\s*```(tsx?|jsx?|javascript|typescript)\s*\((\S+)\)(.*)\*\s*```/gs)) {
const exampleCode = example?.replaceAll(/^\s*\*\s*/g, '');
for (const [_all, type, ref, exampleCode] of docs.matchAll(/@example\s*\*\s*```(tsx?|jsx?|javascript|typescript)\s*\((\S+)\)(.*)\*\s*```/gs)) {
if (ref) {

@@ -45,0 +44,0 @@ findAllExamples(config, pkg, type, examples);

@@ -27,3 +27,3 @@ import { ApiPackage } from '@microsoft/api-extractor-model';

const [ma, mb] = [a, b].map((code) => format((code || '')
.split(/\r?\n\s*/)
.split(/\r?\n\s*\*?\s*/)
.filter((i) => i)

@@ -37,4 +37,3 @@ .join('\n') || '', { parser: 'typescript' }));

if (docs) {
for (const [_all, type, ref, example] of docs.matchAll(/@example\s*\*\s*```(tsx?|jsx?|javascript|typescript)\s*\((\S+)\)(.*)\*\s*```/gs)) {
const exampleCode = example?.replaceAll(/^\s*\*\s*/g, '');
for (const [_all, type, ref, exampleCode] of docs.matchAll(/@example\s*\*\s*```(tsx?|jsx?|javascript|typescript)\s*\((\S+)\)(.*)\*\s*```/gs)) {
if (ref) {

@@ -41,0 +40,0 @@ findAllExamples(config, pkg, type, examples);

6

package.json
{
"name": "@wixc3/docs",
"version": "3.0.5",
"version": "3.0.7",
"description": "API ",

@@ -28,4 +28,4 @@ "main": "dist/cjs/index.js",

"@microsoft/api-extractor-model": "^7.25.2",
"@wixc3/common": "^3.0.5",
"@wixc3/fs-utils": "^3.0.5",
"@wixc3/common": "^3.0.7",
"@wixc3/fs-utils": "^3.0.7",
"glob": "^8.0.3",

@@ -32,0 +32,0 @@ "prettier": "^2.8.0",

@@ -48,3 +48,3 @@ [![npm version](https://badge.fury.io/js/@wixc3%2Fdocs.svg)](https://badge.fury.io/js/@wixc3%2Fdocs)

| [listMacros](https://wixplosives.github.io/core3-utils/docs-macros.listmacros) | <p>Lists all the available macros</p><p>Usage: inside a ts-docs comment block:</p><p><code>[[[listMacros]]]</code></p> |
| [npmBadge](https://wixplosives.github.io/core3-utils/docs-macros.npmbadge) | |
| [npmBadge](https://wixplosives.github.io/core3-utils/docs-macros.npmbadge) | <p>A npm version badge</p><p>Usage: inside a ts-docs comment block:</p><p><code>[[[npmBadge]]]</code></p> |
| [packageName](https://wixplosives.github.io/core3-utils/docs-macros.packagename) | <p>Project's current package name</p><p>Usage: inside a ts-docs comment block of a package:</p><p><code>@wixc3/docs</code></p><p>Will be replace by the full package name, i.e <code>@wixc3/docs-macros</code></p> |

@@ -83,8 +83,8 @@ | [packageNameUrl](https://wixplosives.github.io/core3-utils/docs-macros.packagenameurl) | <p>Project's current package name, in a url friendly format</p><p>Usage: inside a ts-docs comment block of a package:</p><p><code>[[[packageNameUrl]]]</code></p><p>This is useful for generating links and badges</p> |

| Function | Description |
| ------------------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [buildDocs(conf, skipAnalyze, macros)](https://wixplosives.github.io/core3-utils/docs.builddocs) | Build docs markdown |
| [cli()](https://wixplosives.github.io/core3-utils/docs.cli) | |
| [createReadme(conf, siteUrl)](https://wixplosives.github.io/core3-utils/docs.createreadme) | |
| [init(config, force, overrideOrigin)](https://wixplosives.github.io/core3-utils/docs.init) | <p>Initialize docs pre-requisites:</p><p>- Adds api-extractor.json to packages</p><p>- Adds git pages action</p><p>- Creates configs and templates in docs-config</p> |
| Function | Description |
| -------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [buildDocs(config, steps, macros)](https://wixplosives.github.io/core3-utils/docs.builddocs) | Build docs markdown |
| [cli()](https://wixplosives.github.io/core3-utils/docs.cli) | |
| [createReadme(config, siteUrl)](https://wixplosives.github.io/core3-utils/docs.createreadme) | |
| [init(config, force)](https://wixplosives.github.io/core3-utils/docs.init) | <p>Initialize docs pre-requisites:</p><p>- Adds api-extractor.json to packages</p><p>- Adds git pages action</p><p>- Creates configs and templates in docs-config</p> |

@@ -95,3 +95,4 @@ ## Type Aliases

| ----------------------------------------------------------------------- | ----------- |
| [BuildSteps](https://wixplosives.github.io/core3-utils/docs.buildsteps) | |
| [Macros](https://wixplosives.github.io/core3-utils/docs.macros) | |
| [UserConfig](https://wixplosives.github.io/core3-utils/docs.userconfig) | |

@@ -5,3 +5,4 @@ /**

* ```ts (Example1)
* expect(test1()).to.equal(1)
* const value = test1();
* expect(value).to.equal(1);
* ```

@@ -8,0 +9,0 @@ */

@@ -8,3 +8,4 @@ "use strict";

* ```ts (Example1)
* expect(test1()).to.equal(1)
* const value = test1();
* expect(value).to.equal(1);
* ```

@@ -11,0 +12,0 @@ */

@@ -9,3 +9,4 @@ "use strict";

// {@label Example1
(0, chai_1.expect)((0, __1.test1)()).to.equal(1);
const value = (0, __1.test1)();
(0, chai_1.expect)(value).to.equal(1);
// @}

@@ -12,0 +13,0 @@ });

@@ -5,3 +5,4 @@ /**

* ```ts (Example1)
* expect(test1()).to.equal(1)
* const value = test1();
* expect(value).to.equal(1);
* ```

@@ -8,0 +9,0 @@ */

@@ -8,3 +8,4 @@ import { it, describe } from 'mocha';

// {@label Example1
expect(test1()).to.equal(1);
const value = test1();
expect(value).to.equal(1);
// @}

@@ -11,0 +12,0 @@ });

@@ -32,3 +32,3 @@ import { ApiPackage, ApiDeclaredItem, ApiItem } from '@microsoft/api-extractor-model';

(code || '')
.split(/\r?\n\s*/)
.split(/\r?\n\s*\*?\s*/)
.filter((i) => i)

@@ -46,6 +46,5 @@ .join('\n') || '',

if (docs) {
for (const [_all, type, ref, example] of docs.matchAll(
for (const [_all, type, ref, exampleCode] of docs.matchAll(
/@example\s*\*\s*```(tsx?|jsx?|javascript|typescript)\s*\((\S+)\)(.*)\*\s*```/gs
)) {
const exampleCode = example?.replaceAll(/^\s*\*\s*/g, '');
if (ref) {

@@ -52,0 +51,0 @@ findAllExamples(config, pkg, type, examples);

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc