🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

@esy-nightly/esy

Package Overview
Dependencies
Maintainers
3
Versions
600
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@esy-nightly/esy - npm Package Compare versions

Comparing version

to
0.4.4-562321

66

bin/esyInstallRelease.js

@@ -32,2 +32,4 @@ /**

var shouldRewritePrefix = process.env.ESY_RELEASE_REWRITE_PREFIX === 'true';
/**

@@ -274,3 +276,3 @@ * Utils

var releaseBinPath = path.join(releasePackagePath, 'bin');
var storePath = getStorePathForPrefix(releasePackagePath);
var unpaddedStorePath = path.join(releasePackagePath, String(ESY_STORE_VERSION));

@@ -286,22 +288,37 @@ /**

// We try to rewrite path prefix inside a stage path and then transactionally
// mv to the final path
var storeStagePath = path.join(storePath, STORE_STAGE_TREE);
var buildStagePath = path.join(storeStagePath, buildId);
var buildFinalPath = path.join(storePath, STORE_INSTALL_TREE, buildId);
if (storePath != null) {
var storeStagePath = path.join(storePath, STORE_STAGE_TREE);
var buildStagePath = path.join(storeStagePath, buildId);
var buildFinalPath = path.join(storePath, STORE_INSTALL_TREE, buildId);
return fsMkdir(buildStagePath).then(function() {
return childSpawn('tar', ['xzf', filename, '-C', storeStagePath], {
stdio: 'inherit'
}).then(function() {
return fsReadFile(path.join(buildStagePath, '_esy', 'storePrefix')).then(function(
prevStorePrefix
) {
prevStorePrefix = prevStorePrefix.toString();
return rewritePaths(buildStagePath, prevStorePrefix, storePath).then(function() {
return fsRename(buildStagePath, buildFinalPath);
return fsMkdir(buildStagePath).then(function() {
return childSpawn('tar', ['xzf', filename, '-C', storeStagePath], {
stdio: 'inherit'
}).then(function() {
// We try to rewrite path prefix inside a stage path and then transactionally
// mv to the final path
return fsReadFile(path.join(buildStagePath, '_esy', 'storePrefix')).then(function(
prevStorePrefix
) {
prevStorePrefix = prevStorePrefix.toString();
return rewritePaths(buildStagePath, prevStorePrefix, storePath).then(
function() {
return fsRename(buildStagePath, buildFinalPath);
}
);
});
});
});
});
} else {
var storeStagePath = path.join(unpaddedStorePath, STORE_STAGE_TREE);
var buildStagePath = path.join(storeStagePath, buildId);
var buildFinalPath = path.join(unpaddedStorePath, STORE_INSTALL_TREE, buildId);
return fsMkdir(buildStagePath).then(function() {
return childSpawn('tar', ['xzf', filename, '-C', storeStagePath], {
stdio: 'inherit'
}).then(function() {
return fsRename(buildStagePath, buildFinalPath);
});
});
}
}

@@ -373,2 +390,6 @@

function checkStorePath() {
if (!shouldRewritePrefix) {
return;
}
var storePath = getStorePathForPrefix(releasePackagePath);
return fsExists(storePath).then(function(exists) {

@@ -386,2 +407,5 @@ if (exists) {

function initStore() {
var storePath = shouldRewritePrefix
? getStorePathForPrefix(releasePackagePath)
: unpaddedStorePath;
return fsMkdir(storePath).then(function() {

@@ -401,2 +425,6 @@ return Promise.all([

builds.map(function(file) {
var storePath = null;
if (shouldRewritePrefix) {
storePath = getStorePathForPrefix(releasePackagePath);
}
return importBuild(file.absolute, storePath);

@@ -409,2 +437,6 @@ })

function rewriteBinWrappers() {
if (!shouldRewritePrefix) {
return;
}
var storePath = getStorePathForPrefix(releasePackagePath);
return fsReadFile(path.join(releaseBinPath, '_storePath')).then(function(

@@ -411,0 +443,0 @@ prevStorePath

{
"name": "@esy-nightly/esy",
"version": "0.4.4-294759",
"version": "0.4.4-562321",
"license": "MIT",

@@ -5,0 +5,0 @@ "description": "Package builder for esy",

@@ -46,9 +46,11 @@ # esy

│ the enture dependency graph and provides other introspection APIs.
├── esy/bin
│ This dune executable implements "esy" command.
├── esyi
├── esy-solve
│ This dune library implements solver.
├── esy-install
│ This dune library implements installer.
├── esyi/bin
│ This dune executable implements "esy install" command.

@@ -58,2 +60,3 @@ ├── esy-build-package

│ build each package.
├── esy-build-package/bin

@@ -68,4 +71,6 @@ │ This dune executable implements "esy-build-package" command.

│ Parser for #{...} syntax used in esy manifests.
├── esy-shell-expansion
│ A simple shell expansion.
├── esy-yarn-lockfile

@@ -80,9 +85,14 @@ │ Parser for a subset of yarn lockfile format.

├── esy.lock.json
├── esy.lock
├── package.json
├── scripts
├── test
│ Unit tests.
├── test-e2e-slow
│ End-to-end test suite which takes a significiant amount of time.
│ We execute it on CI by placing `@slowtest` token in commit messages.
└── test-e2e

@@ -98,17 +108,18 @@ End-to-end test suite.

% cd esy
% make bootstrap
% esy
% esy bootstrap
```
Run:
### Running Tests
Unit tests:
```
% make
% esy test:unit
```
to see the description of development workflow.
E2E tests:
### Running Tests
```
% make test
% esy test:e2e
```

@@ -122,4 +133,5 @@

- `0.0.x` — maintainance branch for 0.0.x releases.
- `0.2.x` — maintainance branch for 0.2.x releases.
- `0.3.x` — maintainance branch for 0.3.x releases.
## Workflow for esy.sh

@@ -126,0 +138,0 @@

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