Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

documentary

Package Overview
Dependencies
Maintainers
2
Versions
118
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

documentary - npm Package Compare versions

Comparing version 1.35.3 to 1.35.4

6

build/components/Typedef/index.js

@@ -55,7 +55,11 @@ const { h } = require('preact');

/**
* Prints the type definition table.
* @param {Object} opts
* @param {Documentary} opts.documentary
* @param {boolean} [opts.print-imports=false] Add lines with imports
* @param {boolean} opts.slimFunctions Don't add method tables with <kbd> for arguments.
*/
function Typedef({ documentary, children, name, narrow,
flatten, details, level, noArgTypesInToc = false, slimFunctions = false,
'print-imports': noFlatten = false, flatten = !noFlatten, details, level,
noArgTypesInToc = false, slimFunctions = false,
}) {

@@ -62,0 +66,0 @@ details = details ? details.split(',') : []

3

build/components/Typedef/lib.js

@@ -32,2 +32,3 @@ const { h } = require('preact');

let table = method.description || ''
const nameProcess = makeIconsName(allTypes, documentary)
const lis = method.args.map(({ optional, name, type, description }) => {

@@ -41,3 +42,3 @@ optional = optional || name.startsWith('...')

...linkingOpts,
nameProcess: makeIconsName(allTypes, documentary),
nameProcess,
})

@@ -44,0 +45,0 @@ useCode = typeWithLink != type

const { Replaceable, replace } = require('../../stdlib');
const { collect } = require('../../stdlib');
const { relative, sep, join, resolve } = require('path');
const { relative, sep, join, resolve, dirname } = require('path');
const { typedefMdRe } = require('./rules/typedef-md');

@@ -224,3 +224,14 @@ const { read } = require('./');

loc = loc.trim() || 'typedefs.json'
const data = require(resolve(loc))
let data
try {
// if a package is referenced
const p = `${loc}/package.json`
const { typedefs: td } = require(p)
const pl = require.resolve(p)
if (td) loc = join(dirname(pl), td)
else throw new Error(`typedefs field not found in ${loc}/package.json`)
} catch (err) {
loc = resolve(loc)
}
data = require(loc)
Object.entries(data).forEach(([k, d]) => {

@@ -227,0 +238,0 @@ const n = `${namespace}.`

@@ -0,1 +1,9 @@

## 21 December 2019
### [1.35.4](https://github.com/artdecocode/documentary/compare/v1.35.3...v1.35.4)
- [feature] Read `<include-typedefs>` from package.json's typedefs field.
- [feature] Flatten imports in types by default.
- [fix] Update _Typal_ to fix linking order bug.
## 20 December 2019

@@ -2,0 +10,0 @@

{
"name": "documentary",
"version": "1.35.3",
"version": "1.35.4",
"description": "Documentation Compiler To Generate The Table Of Contents, Embed Examples With Their Output, Make Markdown Tables, Maintain Typedefs For JavaScript And README, Watch Changes To Push, Use Macros And Prettify API Titles.",

@@ -89,2 +89,3 @@ "main": "build",

"@idio/debug": "^1.2.3",
"@typedefs/goa": "^0.1.4",
"@wrote/clone": "^1.2.1",

@@ -123,4 +124,4 @@ "@wrote/ensure-path": "^1.1.0",

"preact": "8.5.3",
"typal": "^1.24.17"
"typal": "^1.24.19"
}
}
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