New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

solidity-docgen

Package Overview
Dependencies
Maintainers
2
Versions
90
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

solidity-docgen - npm Package Compare versions

Comparing version 0.5.8-1 to 0.5.8-2

dist/cli.d.ts

7

CHANGELOG.md
# Changelog
## 0.5.8
- Fixed issues with ignored newlines in solc >= 0.6.9.
This may change the output slightly for all users of solc >= 0.6. This
shouldn't be an issue if the output format is Markdown.
## 0.5.7

@@ -4,0 +11,0 @@

35

dist/solc.js

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

sources: sources,
settings: Object.assign(Object.assign({}, solcSettings), { outputSelection: exports.outputSelection }),
settings: { ...solcSettings, outputSelection: exports.outputSelection },
};

@@ -97,16 +97,21 @@ const solcOutput = solc.compile(solcInput);

const reader = new ASTReader(input, solcOutput);
if (semver_1.default.satisfies(this.solc.version(), '>=0.6')) {
const adaptDocumentation = (node) => {
var _a;
if ((_a = node.documentation) === null || _a === void 0 ? void 0 : _a.text) {
node.documentation = cleanUpDocstring(reader.read(node.documentation));
}
};
for (const source of Object.values(solcOutput.sources)) {
for (const fileNode of source.ast.nodes) {
adaptDocumentation(fileNode);
if (fileNode.nodeType === 'ContractDefinition') {
for (const contractNode of fileNode.nodes) {
adaptDocumentation(contractNode);
}
const adaptDocumentation = (node) => {
var _a;
if (typeof node.documentation === 'string') {
// fix solc buggy parsing of doc comments
// reverse engineered from solc behavior...
node.documentation = node.documentation
.replace(/\n\n?^[ \t]*(?:\*|\/\/\/)/mg, '\n\n')
.replace(/^[ \t]?/mg, '');
}
else if ((_a = node.documentation) === null || _a === void 0 ? void 0 : _a.text) {
node.documentation = cleanUpDocstring(reader.read(node.documentation));
}
};
for (const source of Object.values(solcOutput.sources)) {
for (const fileNode of source.ast.nodes) {
adaptDocumentation(fileNode);
if (fileNode.nodeType === 'ContractDefinition') {
for (const contractNode of fileNode.nodes) {
adaptDocumentation(contractNode);
}

@@ -113,0 +118,0 @@ }

@@ -285,6 +285,3 @@ "use strict";

const res = {};
// fix solc buggy parsing of doc comments
// reverse engineered from solc behavior...
const raw = doc.replace(/\n\n?^[ \t]*(?:\*|\/\/\/)/mg, '\n\n').replace(/^[ \t]*/mg, '');
const tagMatches = execall(/^(?:@(\w+) )?((?:(?!^@\w+ )[^])*)/m, raw);
const tagMatches = execall(/^(?:@(\w+) )?((?:(?!^@\w+ )[^])*)/m, doc);
for (const [, tag, content] of tagMatches) {

@@ -291,0 +288,0 @@ if (tag === 'dev') {

{
"name": "solidity-docgen",
"version": "0.5.8-1",
"version": "0.5.8-2",
"description": "Solidity API documentation automatic generator.",

@@ -5,0 +5,0 @@ "repository": "github:OpenZeppelin/solidity-docgen",

@@ -28,1 +28,9 @@ # `solidity-docgen`

[NatSpec]: https://solidity.readthedocs.io/en/develop/natspec-format.html
### Solidity 0.7
The built in compiler remains solc 0.6, but users who want to use the newer compiler version can do so by installing the desired solc version and using the flag `--solc-module`. Here's an example using npm aliases:
```
npm install -D solc-0.7@npm:solc@^0.7.0
npx solidity-docgen --solc-module solc-0.7
```

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