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

@alloy-js/core

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@alloy-js/core - npm Package Compare versions

Comparing version 0.2.0 to 0.3.0

7

CHANGELOG.md
# Changelog - @alloy-js/core
## 0.3.0
### Features
- [#38](https://github.com/alloy-framework/alloy/pull/38) Add indent prop to source files for setting indent level.
## 0.2.0

@@ -6,0 +13,0 @@

import { Children, ComponentDefinition } from "@alloy-js/core/jsx-runtime";
import { Refkey } from "../refkey.js";
export interface SourceFileProps {
/**
* The path of this file relative to its parent directory
*/
path: string;
/**
* The type of contents in this file.
*/
filetype: string;
children?: Children[];
/**
* The component to use to render refkeys references within the file's
* contents.
*/
reference?: ComponentDefinition<{
refkey: Refkey;
}>;
/**
* A string representing one indent level, used when reindenting contents of
* this file.
*/
indent?: string;
}
export declare function SourceFile(props: SourceFileProps): any;
//# sourceMappingURL=SourceFile.d.ts.map

14

dist/src/components/SourceFile.js

@@ -6,2 +6,3 @@ import { createComponent as _$createComponent } from "@alloy-js/core/jsx-runtime";

import { useContext } from "../context.js";
import { IndentContext } from "../context/indent.js";
import { SourceDirectoryContext } from "../context/source-directory.js";

@@ -23,3 +24,14 @@ import { SourceFileContext } from "../context/source-file.js";

get children() {
return props.children;
return _$memo(() => !!props.indent)() ? _$createComponent(IndentContext.Provider, {
get value() {
return {
level: 0,
indent: props.indent,
indentString: ""
};
},
get children() {
return props.children;
}
}) : props.children;
}

@@ -26,0 +38,0 @@ });

2

package.json
{
"name": "@alloy-js/core",
"version": "0.2.0",
"version": "0.3.0",
"description": "",

@@ -5,0 +5,0 @@ "main": "./dist/src/index.js",

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 too big to display

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