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

@teambit/semantics.entities.semantic-schema

Package Overview
Dependencies
Maintainers
16
Versions
73
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@teambit/semantics.entities.semantic-schema - npm Package Compare versions

Comparing version 0.0.51 to 0.0.53

dist/preview-1678246516830.js

10

api-schema.ts

@@ -18,2 +18,3 @@ import { Transform, plainToInstance } from 'class-transformer';

import { componentIdTransformer } from './class-transformers/comp-id-transformer';
import { TagName } from './schemas/docs/tag';

@@ -30,2 +31,5 @@ export class APISchema extends SchemaNode {

@Transform(schemaObjArrayToInstances)
readonly taggedModuleExports: SchemaNode[];
constructor(readonly location: Location, module: ModuleSchema, internals: ModuleSchema[], componentId: ComponentID) {

@@ -36,4 +40,10 @@ super();

this.componentId = componentId;
this.taggedModuleExports = this.listTaggedExports(module);
}
listTaggedExports(module?: ModuleSchema) {
if (!module) return [];
return module.exports.filter((e) => e.doc?.hasTag(TagName.exports));
}
toString() {

@@ -40,0 +50,0 @@ return JSON.stringify(

2

dist/api-schema.d.ts

@@ -9,3 +9,5 @@ import { ComponentID } from '@teambit/component-id';

readonly componentId: ComponentID;
readonly taggedModuleExports: SchemaNode[];
constructor(location: Location, module: ModuleSchema, internals: ModuleSchema[], componentId: ComponentID);
listTaggedExports(module?: ModuleSchema): SchemaNode[];
toString(): string;

@@ -12,0 +14,0 @@ toStringPerType(): string;

@@ -19,2 +19,3 @@ "use strict";

const comp_id_transformer_1 = require("./class-transformers/comp-id-transformer");
const tag_1 = require("./schemas/docs/tag");
class APISchema extends schema_node_1.SchemaNode {

@@ -27,3 +28,9 @@ constructor(location, module, internals, componentId) {

this.componentId = componentId;
this.taggedModuleExports = this.listTaggedExports(module);
}
listTaggedExports(module) {
if (!module)
return [];
return module.exports.filter((e) => { var _a; return (_a = e.doc) === null || _a === void 0 ? void 0 : _a.hasTag(tag_1.TagName.exports); });
}
toString() {

@@ -71,3 +78,6 @@ return JSON.stringify(this.module.exports.map((exp) => exp.toObject()), undefined, 2);

], APISchema.prototype, "componentId", void 0);
__decorate([
(0, class_transformer_1.Transform)(class_transformers_1.schemaObjArrayToInstances)
], APISchema.prototype, "taggedModuleExports", void 0);
exports.APISchema = APISchema;
//# sourceMappingURL=api-schema.js.map

3

dist/schemas/docs/tag.d.ts

@@ -32,3 +32,4 @@ import { Location, SchemaNode } from '../../schema-node';

return = "return",
deprecated = "deprecated"
deprecated = "deprecated",
exports = "exports"
}

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

TagName["deprecated"] = "deprecated";
TagName["exports"] = "exports";
})(TagName = exports.TagName || (exports.TagName = {}));
//# sourceMappingURL=tag.js.map
{
"name": "@teambit/semantics.entities.semantic-schema",
"version": "0.0.51",
"version": "0.0.53",
"homepage": "https://bit.dev/teambit/semantics/entities/semantic-schema",

@@ -9,3 +9,3 @@ "main": "dist/index.js",

"name": "entities/semantic-schema",
"version": "0.0.51"
"version": "0.0.53"
},

@@ -12,0 +12,0 @@ "dependencies": {

@@ -38,2 +38,3 @@ import { Location, SchemaNode } from '../../schema-node';

deprecated = 'deprecated',
exports = 'exports',
}

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