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

@markuplint/file-resolver

Package Overview
Dependencies
Maintainers
1
Versions
179
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@markuplint/file-resolver - npm Package Compare versions

Comparing version 1.0.0-alpha.7 to 1.0.0-alpha.8

test/fixtures/003/.markuplintrc

2

lib/get-anonymous-file.d.ts
import { MLFile } from './';
export declare function getAnonymousFile(context: string): MLFile;
export declare function getAnonymousFile(context: string, workspace?: string): MLFile;
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var _1 = require("./");
function getAnonymousFile(context) {
var file = new _1.MLFile(context, true);
function getAnonymousFile(context, workspace) {
var file = new _1.MLFile(context, true, workspace);
return file;
}
exports.getAnonymousFile = getAnonymousFile;
"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());

@@ -8,0 +9,0 @@ });

@@ -14,6 +14,7 @@ "use strict";

var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());

@@ -49,2 +50,9 @@ });

};
var __spreadArrays = (this && this.__spreadArrays) || function () {
for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
for (var r = Array(s), k = 0, i = 0; i < il; i++)
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
r[k] = a[j];
return r;
};
var __importDefault = (this && this.__importDefault) || function (mod) {

@@ -74,2 +82,3 @@ return (mod && mod.__esModule) ? mod : { "default": mod };

}
dir = path_1.default.dirname(dir);
return [4 /*yield*/, explorer.search(dir)];

@@ -173,3 +182,3 @@ case 1:

function margeConfig(a, b) {
return __assign({}, a, b, { rules: __assign({}, a.rules, b.rules), nodeRules: (a.nodeRules || []).concat((b.nodeRules || [])), childNodeRules: (a.childNodeRules || []).concat((b.childNodeRules || [])) });
return __assign(__assign(__assign({}, a), b), { rules: __assign(__assign({}, a.rules), b.rules), nodeRules: __spreadArrays((a.nodeRules || []), (b.nodeRules || [])), childNodeRules: __spreadArrays((a.childNodeRules || []), (b.childNodeRules || [])) });
}
"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());

@@ -8,0 +9,0 @@ });

@@ -6,6 +6,6 @@ export declare class MLFile {

*
* @param filePath A file path or context
* @param filePathOrContext A file path or context
* @param anonymous if 1st param is a context
*/
constructor(filePath: string, anonymous?: boolean);
constructor(filePathOrContext: string, anonymous?: boolean, workspace?: string);
readonly path: string;

@@ -12,0 +12,0 @@ isExist(): Promise<boolean>;

"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());

@@ -50,15 +51,16 @@ });

*
* @param filePath A file path or context
* @param filePathOrContext A file path or context
* @param anonymous if 1st param is a context
*/
function MLFile(filePath, anonymous) {
function MLFile(filePathOrContext, anonymous, workspace) {
if (anonymous === void 0) { anonymous = false; }
if (workspace === void 0) { workspace = process.cwd(); }
this.anonymous = anonymous;
if (anonymous) {
this._filePath = '<AnonymousFile>';
this._filePath = workspace + "/<AnonymousFile>";
// `filePath` is context
fileCaches.set(this, filePath);
fileCaches.set(this, filePathOrContext);
}
else {
this._filePath = path_1.default.resolve(filePath);
this._filePath = path_1.default.resolve(filePathOrContext);
}

@@ -65,0 +67,0 @@ }

"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());

@@ -8,0 +9,0 @@ });

{
"name": "@markuplint/file-resolver",
"version": "1.0.0-alpha.7",
"version": "1.0.0-alpha.8",
"description": "The file resolver of markuplint",

@@ -21,10 +21,10 @@ "repository": "git@github.com:markuplint/markuplint.git",

"@types/glob": "^7.1.1",
"@types/node": "^11.13.0"
"@types/node": "^12.7.3"
},
"dependencies": {
"@markuplint/ml-config": "^1.0.0-alpha.4",
"cosmiconfig": "^5.2.0",
"glob": "^7.1.3"
"@markuplint/ml-config": "^1.0.0-alpha.5",
"cosmiconfig": "^5.2.1",
"glob": "^7.1.4"
},
"gitHead": "a0579c5cf64e6b8a4506b3d398f4e6be5c674706"
"gitHead": "f5aac1a89a1de8e937caf49a23244e72638c6ca1"
}

@@ -26,8 +26,4 @@ # @markuplint/file-resolver

***
---
Copyright &copy; 2019 markuplint. Unter the MIT License.

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