antongolub / lockfile Goto Github PK
View Code? Open in Web Editor NEWRead and write lockfiles with reasonable losses
License: MIT License
Read and write lockfiles with reasonable losses
License: MIT License
https://github.com/qiwi/pijma
Error: inconsistent snapshot: react-docgen-typescript patch:react-docgen-typescript@npm%3A2.2.2#~/.yarn/patches/react-docgen-typescript-npm-2.2.2-afb9698a32.patch
I'm using @antongolub/lockfile
in my application to parse some dependencies and their sub-dependencies.
When I execute the analyze
function, it throws the following exception:
Uncaught Error: inconsistent snapshot: string-width ^4.1.0
(anonymous function) analyze.ts:65
walk analyze.ts:62
walk analyze.ts:76
walk analyze.ts:76
walk analyze.ts:76
(anonymous function) analyze.ts:123
analyze analyze.ts:123
getDependencyTree build.mjs:61
copyDependencies build.mjs:69
(anonymous function) build.mjs:74
run module_job:194
Async call from await
runMainESM run_main:60
executeUserEntryPoint run_main:83
(anonymous function) run_main_module:23
Here is my code:
const dependencies = [
'zip-lib'
]
function getDependencyTree() {
const lf = fse.readFileSync('../yarn.lock', 'utf-8')
const pkg = fse.readFileSync('../package.json', 'utf-8')
const snapshot = parse(lf, pkg) // Holds JSON-friendly TEntries[]
const idx = analyze(snapshot) // An index to represent repo dep graphs
let tree = idx.tree;
return Object.keys(tree)
.filter(s => s.split(',').length > 1 && dependencies.indexOf(s.split(',')[1]) !== -1)
.map(s => tree[s].chunks[tree[s].chunks.length - 1]);
}
function copyDependencies() {
let tree = getDependencyTree()
console.log(1)
}
//copy depts what angular not include
copyDependencies()
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.