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

@compas/code-gen

Package Overview
Dependencies
Maintainers
1
Versions
202
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@compas/code-gen - npm Package Compare versions

Comparing version 0.0.127 to 0.0.128

10

package.json
{
"name": "@compas/code-gen",
"version": "0.0.127",
"version": "0.0.128",
"description": "Generate various boring parts of your server",

@@ -18,5 +18,5 @@ "main": "./index.js",

"dependencies": {
"@compas/cli": "0.0.127",
"@compas/insight": "0.0.127",
"@compas/stdlib": "0.0.127"
"@compas/cli": "0.0.128",
"@compas/insight": "0.0.128",
"@compas/stdlib": "0.0.128"
},

@@ -44,3 +44,3 @@ "maintainers": [

},
"gitHead": "5bc1438cddeb96b50f0395f7de18ba5c1c5b8c91"
"gitHead": "0ca512dd447ebebc6c6793e2728cfb4c172b0181"
}

@@ -0,1 +1,2 @@

import { isNil } from "@compas/stdlib";
import { TypeBuilder } from "./TypeBuilder.js";

@@ -23,2 +24,18 @@

build() {
const result = super.build();
if (
!result.validator.floatingPoint &&
isNil(result.validator.min) &&
isNil(result.validator.max)
) {
// Add default integer sizes when no min & max is specified
result.validator.min = -2_147_483_647;
result.validator.max = 2_147_483_647;
}
return result;
}
/**

@@ -25,0 +42,0 @@ * @param {...number} values

@@ -25,6 +25,5 @@ import { isNil } from "@compas/stdlib";

.join("\n")
.replace(/^(\s*\n)+/gm, "\n") // Replace multiple new lines
.replace(/^(\s*\*\s*\n)+/gm, " *\n") // replace empty lines in JSDoc (i.e. line is with ` *`)
.replace(/^(\s*\*.*\n)\s*\n/gm, "$1") // Strip empty new lines after a doc line
.replace(/^\/\*\*\s*(\n\s*\*\s*)+$/gm, "/**\n") // Stip empty lines at the start of a doc block
.replace(/^\/\*\*\s*(\n\s*\*\s*(?=\n))+$/gm, "/**\n") // Strip empty lines at the start of a doc block
.replace(/(\n){3,}/gm, "\n\n"); // Remove too much empty lines

@@ -31,0 +30,0 @@ }

@@ -161,7 +161,8 @@ import { isNil } from "@compas/stdlib";

}
return js`
* @returns
{
${getTypeNameForType(context.context, data[name], "", {})}
}`;
return js`* @returns {${getTypeNameForType(
context.context,
data[name],
"",
{},
)}}`;
}}

@@ -168,0 +169,0 @@ */

Sorry, the diff of this file is too big to display

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