refactor: rename cafs to store.cafs

This commit is contained in:
Zoltan Kochan
2023-07-19 01:52:03 +03:00
parent 4bbf482d1e
commit 5ce333519d
34 changed files with 77 additions and 665 deletions

View File

@@ -1,5 +1,7 @@
---
"@pnpm/cafs": patch
"@pnpm/store.cafs": major
---
The package is renamed from `@pnpm/cafs` to `@pnpm/store.cafs`.
The content-addressable store locker should be only created once per process. This fixes an issue that started happening after merging [#6817](https://github.com/pnpm/pnpm/pull/6817)

View File

@@ -40,7 +40,7 @@
"test": "pnpm pretest && pnpm run compile && jest"
},
"dependencies": {
"@pnpm/cafs": "workspace:*",
"@pnpm/store.cafs": "workspace:*",
"@pnpm/registry-mock": "3.10.2",
"path-exists": "^4.0.0"
},

View File

@@ -1,5 +1,5 @@
import path from 'path'
import { getFilePathInCafs } from '@pnpm/cafs'
import { getFilePathInCafs } from '@pnpm/store.cafs'
import { getIntegrity, REGISTRY_MOCK_PORT } from '@pnpm/registry-mock'
import exists from 'path-exists'

View File

@@ -45,7 +45,7 @@
"write-yaml-file": "^5.0.0"
},
"dependencies": {
"@pnpm/cafs": "workspace:*",
"@pnpm/store.cafs": "workspace:*",
"@pnpm/calc-dep-state": "workspace:*",
"@pnpm/cli-utils": "workspace:*",
"@pnpm/common-cli-options-help": "workspace:*",

View File

@@ -1,5 +1,5 @@
import path from 'path'
import { getFilePathInCafs, type PackageFilesIndex } from '@pnpm/cafs'
import { getFilePathInCafs, type PackageFilesIndex } from '@pnpm/store.cafs'
import { calcDepState, lockfileToDepGraph, type DepsStateCache } from '@pnpm/calc-dep-state'
import {
LAYOUT_VERSION,

View File

@@ -1,7 +1,7 @@
/// <reference path="../../../__typings__/index.d.ts" />
import fs from 'fs'
import path from 'path'
import { getFilePathInCafs } from '@pnpm/cafs'
import { getFilePathInCafs } from '@pnpm/store.cafs'
import { ENGINE_NAME, WANTED_LOCKFILE } from '@pnpm/constants'
import { rebuild } from '@pnpm/plugin-commands-rebuild'
import { prepare } from '@pnpm/prepare'

View File

@@ -39,7 +39,7 @@
"execa": "npm:safe-execa@0.1.2"
},
"devDependencies": {
"@pnpm/cafs": "workspace:*",
"@pnpm/store.cafs": "workspace:*",
"@pnpm/create-cafs-store": "workspace:*",
"@pnpm/git-fetcher": "workspace:*",
"@pnpm/types": "workspace:*",

View File

@@ -46,7 +46,7 @@
"ssri": "10.0.4"
},
"devDependencies": {
"@pnpm/cafs": "workspace:*",
"@pnpm/store.cafs": "workspace:*",
"@pnpm/cafs-types": "workspace:*",
"@pnpm/create-cafs-store": "workspace:*",
"@pnpm/fetch": "workspace:*",

View File

@@ -4,7 +4,7 @@ import path from 'path'
import { FetchError, PnpmError } from '@pnpm/error'
import { createFetchFromRegistry } from '@pnpm/fetch'
import { createCafsStore } from '@pnpm/create-cafs-store'
import { getFilePathInCafs } from '@pnpm/cafs'
import { getFilePathInCafs } from '@pnpm/store.cafs'
import { globalWarn } from '@pnpm/logger'
import { fixtures } from '@pnpm/test-fixtures'
import {

View File

@@ -42,7 +42,7 @@
"rimraf": "^3.0.2"
},
"dependencies": {
"@pnpm/cafs": "workspace:*",
"@pnpm/store.cafs": "workspace:*",
"@pnpm/config": "workspace:*",
"@pnpm/dependency-path": "workspace:*",
"@pnpm/lockfile-file": "workspace:*",

View File

@@ -1,4 +1,4 @@
import { type PackageFilesIndex } from '@pnpm/cafs'
import { type PackageFilesIndex } from '@pnpm/store.cafs'
export function readdir (index: PackageFilesIndex, dir: string) {
const dirs = new Set<string>()

View File

@@ -1,5 +1,5 @@
import fs from 'fs'
import { getFilePathInCafs, getFilePathByModeInCafs, type PackageFilesIndex } from '@pnpm/cafs'
import { getFilePathInCafs, getFilePathByModeInCafs, type PackageFilesIndex } from '@pnpm/store.cafs'
import { type Lockfile, readWantedLockfile, type PackageSnapshot, type TarballResolution } from '@pnpm/lockfile-file'
import {
nameVerFromPkgSnapshot,

View File

@@ -72,7 +72,7 @@
"devDependencies": {
"@pnpm/assert-project": "workspace:*",
"@pnpm/assert-store": "workspace:*",
"@pnpm/cafs": "workspace:*",
"@pnpm/store.cafs": "workspace:*",
"@pnpm/client": "workspace:*",
"@pnpm/core": "workspace:*",
"@pnpm/git-utils": "workspace:*",

View File

@@ -419,7 +419,7 @@ Note that in CI environments, this setting is enabled by default.`,
hint: 'Note that in CI environments this setting is true by default. If you still need to run install in such cases, use "pnpm install --no-frozen-lockfile"',
})
}
/* eslint-disable @typescript-eslint/restrict-template-expressions */
throw new PnpmError('OUTDATED_LOCKFILE',
`Cannot install with "frozen-lockfile" because ${WANTED_LOCKFILE} is not up to date with ` +
path.relative(opts.lockfileDir, path.join(rootDir, 'package.json')), {

View File

@@ -1,6 +1,6 @@
import fs from 'fs'
import path from 'path'
import { type PackageFilesIndex } from '@pnpm/cafs'
import { type PackageFilesIndex } from '@pnpm/store.cafs'
import { ENGINE_NAME } from '@pnpm/constants'
import { install } from '@pnpm/core'
import { prepareEmpty } from '@pnpm/prepare'

View File

@@ -1,7 +1,7 @@
import { promises as fs, existsSync, readFileSync } from 'fs'
import path from 'path'
import { addDependenciesToPackage, install } from '@pnpm/core'
import { getFilePathInCafs, getFilePathByModeInCafs, type PackageFilesIndex } from '@pnpm/cafs'
import { getFilePathInCafs, getFilePathByModeInCafs, type PackageFilesIndex } from '@pnpm/store.cafs'
import { getIntegrity, REGISTRY_MOCK_PORT } from '@pnpm/registry-mock'
import { prepareEmpty } from '@pnpm/prepare'
import { ENGINE_NAME } from '@pnpm/constants'

View File

@@ -16,7 +16,7 @@
},
"devDependencies": {
"@pnpm/assert-project": "workspace:*",
"@pnpm/cafs": "workspace:*",
"@pnpm/store.cafs": "workspace:*",
"@pnpm/client": "workspace:*",
"@pnpm/headless": "workspace:*",
"@pnpm/package-store": "workspace:*",

View File

@@ -2,7 +2,7 @@
import { promises as fs, existsSync, realpathSync, writeFileSync } from 'fs'
import path from 'path'
import { assertProject } from '@pnpm/assert-project'
import { getFilePathInCafs } from '@pnpm/cafs'
import { getFilePathInCafs } from '@pnpm/store.cafs'
import { ENGINE_NAME, WANTED_LOCKFILE } from '@pnpm/constants'
import {
type PackageManifestLog,

View File

@@ -35,7 +35,7 @@
"@pnpm/logger": "^5.0.0"
},
"dependencies": {
"@pnpm/cafs": "workspace:*",
"@pnpm/store.cafs": "workspace:*",
"@pnpm/core-loggers": "workspace:*",
"@pnpm/dependency-path": "workspace:*",
"@pnpm/error": "workspace:*",

View File

@@ -8,7 +8,7 @@ import {
getFilePathInCafs as _getFilePathInCafs,
type PackageFileInfo,
type PackageFilesIndex,
} from '@pnpm/cafs'
} from '@pnpm/store.cafs'
import { fetchingProgressLogger, progressLogger } from '@pnpm/core-loggers'
import { pickFetcher } from '@pnpm/pick-fetcher'
import { PnpmError } from '@pnpm/error'

View File

@@ -1,7 +1,7 @@
/// <reference path="../../../__typings__/index.d.ts" />
import { promises as fs, statSync } from 'fs'
import path from 'path'
import { getFilePathInCafs, type PackageFilesIndex, type PackageFileInfo } from '@pnpm/cafs'
import { getFilePathInCafs, type PackageFilesIndex, type PackageFileInfo } from '@pnpm/store.cafs'
import { createClient } from '@pnpm/client'
import { streamParser } from '@pnpm/logger'
import { createPackageRequester, type PackageResponse } from '@pnpm/package-requester'

78
pnpm-lock.yaml generated
View File

@@ -257,12 +257,12 @@ importers:
__utils__/assert-store:
dependencies:
'@pnpm/cafs':
specifier: workspace:*
version: link:../../store/cafs
'@pnpm/registry-mock':
specifier: 3.10.2
version: 3.10.2(typanion@3.13.0)
'@pnpm/store.cafs':
specifier: workspace:*
version: link:../../store/cafs
path-exists:
specifier: ^4.0.0
version: 4.0.0
@@ -1149,9 +1149,6 @@ importers:
exec/plugin-commands-rebuild:
dependencies:
'@pnpm/cafs':
specifier: workspace:*
version: link:../../store/cafs
'@pnpm/calc-dep-state':
specifier: workspace:*
version: link:../../packages/calc-dep-state
@@ -1221,6 +1218,9 @@ importers:
'@pnpm/store-controller-types':
specifier: workspace:*
version: link:../../store/store-controller-types
'@pnpm/store.cafs':
specifier: workspace:*
version: link:../../store/cafs
'@pnpm/types':
specifier: workspace:*
version: link:../../packages/types
@@ -1519,15 +1519,15 @@ importers:
specifier: npm:safe-execa@0.1.2
version: /safe-execa@0.1.2
devDependencies:
'@pnpm/cafs':
specifier: workspace:*
version: link:../../store/cafs
'@pnpm/create-cafs-store':
specifier: workspace:*
version: link:../../store/create-cafs-store
'@pnpm/git-fetcher':
specifier: workspace:*
version: 'link:'
'@pnpm/store.cafs':
specifier: workspace:*
version: link:../../store/cafs
'@pnpm/types':
specifier: workspace:*
version: link:../../packages/types
@@ -1586,9 +1586,6 @@ importers:
specifier: 10.0.4
version: 10.0.4
devDependencies:
'@pnpm/cafs':
specifier: workspace:*
version: link:../../store/cafs
'@pnpm/cafs-types':
specifier: workspace:*
version: link:../../store/cafs-types
@@ -1598,6 +1595,9 @@ importers:
'@pnpm/fetch':
specifier: workspace:*
version: link:../../network/fetch
'@pnpm/store.cafs':
specifier: workspace:*
version: link:../../store/cafs
'@pnpm/tarball-fetcher':
specifier: workspace:*
version: 'link:'
@@ -2289,9 +2289,6 @@ importers:
modules-mounter/daemon:
dependencies:
'@pnpm/cafs':
specifier: workspace:*
version: link:../../store/cafs
'@pnpm/config':
specifier: workspace:*
version: link:../../config/config
@@ -2310,6 +2307,9 @@ importers:
'@pnpm/store-path':
specifier: workspace:*
version: link:../../store/store-path
'@pnpm/store.cafs':
specifier: workspace:*
version: link:../../store/cafs
'@pnpm/types':
specifier: workspace:*
version: link:../../packages/types
@@ -3010,9 +3010,6 @@ importers:
'@pnpm/assert-store':
specifier: workspace:*
version: link:../../__utils__/assert-store
'@pnpm/cafs':
specifier: workspace:*
version: link:../../store/cafs
'@pnpm/client':
specifier: workspace:*
version: link:../client
@@ -3037,6 +3034,9 @@ importers:
'@pnpm/store-path':
specifier: workspace:*
version: link:../../store/store-path
'@pnpm/store.cafs':
specifier: workspace:*
version: link:../../store/cafs
'@pnpm/test-fixtures':
specifier: workspace:*
version: link:../../__utils__/test-fixtures
@@ -3283,9 +3283,6 @@ importers:
'@pnpm/assert-project':
specifier: workspace:*
version: link:../../__utils__/assert-project
'@pnpm/cafs':
specifier: workspace:*
version: link:../../store/cafs
'@pnpm/client':
specifier: workspace:*
version: link:../client
@@ -3307,6 +3304,9 @@ importers:
'@pnpm/store-path':
specifier: workspace:*
version: link:../../store/store-path
'@pnpm/store.cafs':
specifier: workspace:*
version: link:../../store/cafs
'@pnpm/test-fixtures':
specifier: workspace:*
version: link:../../__utils__/test-fixtures
@@ -3576,9 +3576,6 @@ importers:
pkg-manager/package-requester:
dependencies:
'@pnpm/cafs':
specifier: workspace:*
version: link:../../store/cafs
'@pnpm/core-loggers':
specifier: workspace:*
version: link:../../packages/core-loggers
@@ -3612,6 +3609,9 @@ importers:
'@pnpm/store-controller-types':
specifier: workspace:*
version: link:../../store/store-controller-types
'@pnpm/store.cafs':
specifier: workspace:*
version: link:../../store/cafs
'@pnpm/types':
specifier: workspace:*
version: link:../../packages/types
@@ -5065,9 +5065,6 @@ importers:
reviewing/license-scanner:
dependencies:
'@pnpm/cafs':
specifier: workspace:*
version: link:../../store/cafs
'@pnpm/dependency-path':
specifier: workspace:*
version: link:../../packages/dependency-path
@@ -5098,6 +5095,9 @@ importers:
'@pnpm/read-package-json':
specifier: workspace:*
version: link:../../pkg-manifest/read-package-json
'@pnpm/store.cafs':
specifier: workspace:*
version: link:../../store/cafs
'@pnpm/types':
specifier: workspace:*
version: link:../../packages/types
@@ -5513,12 +5513,12 @@ importers:
specifier: ^2.2.0
version: 2.2.0
devDependencies:
'@pnpm/cafs':
specifier: workspace:*
version: 'link:'
'@pnpm/cafs-types':
specifier: workspace:*
version: link:../cafs-types
'@pnpm/store.cafs':
specifier: workspace:*
version: 'link:'
'@pnpm/types':
specifier: workspace:*
version: link:../../packages/types
@@ -5558,9 +5558,6 @@ importers:
store/create-cafs-store:
dependencies:
'@pnpm/cafs':
specifier: workspace:*
version: link:../cafs
'@pnpm/fetcher-base':
specifier: workspace:*
version: link:../../fetching/fetcher-base
@@ -5573,6 +5570,9 @@ importers:
'@pnpm/store-controller-types':
specifier: workspace:*
version: link:../store-controller-types
'@pnpm/store.cafs':
specifier: workspace:*
version: link:../cafs
mem:
specifier: ^8.1.1
version: 8.1.1
@@ -5598,9 +5598,6 @@ importers:
store/package-store:
dependencies:
'@pnpm/cafs':
specifier: workspace:*
version: link:../cafs
'@pnpm/create-cafs-store':
specifier: workspace:*
version: link:../create-cafs-store
@@ -5619,6 +5616,9 @@ importers:
'@pnpm/store-controller-types':
specifier: workspace:*
version: link:../store-controller-types
'@pnpm/store.cafs':
specifier: workspace:*
version: link:../cafs
'@pnpm/types':
specifier: workspace:*
version: link:../../packages/types
@@ -5729,9 +5729,6 @@ importers:
store/plugin-commands-store:
dependencies:
'@pnpm/cafs':
specifier: workspace:*
version: link:../cafs
'@pnpm/cli-utils':
specifier: workspace:*
version: link:../../cli/cli-utils
@@ -5771,6 +5768,9 @@ importers:
'@pnpm/store-path':
specifier: workspace:*
version: link:../store-path
'@pnpm/store.cafs':
specifier: workspace:*
version: link:../cafs
'@pnpm/types':
specifier: workspace:*
version: link:../../packages/types

View File

@@ -33,7 +33,7 @@
"@pnpm/logger": "^5.0.0"
},
"dependencies": {
"@pnpm/cafs": "workspace:*",
"@pnpm/store.cafs": "workspace:*",
"@pnpm/dependency-path": "workspace:*",
"@pnpm/directory-fetcher": "workspace:*",
"@pnpm/error": "workspace:*",

View File

@@ -10,7 +10,7 @@ import {
getFilePathInCafs,
type PackageFileInfo,
type PackageFilesIndex,
} from '@pnpm/cafs'
} from '@pnpm/store.cafs'
import loadJsonFile from 'load-json-file'
import { PnpmError } from '@pnpm/error'
import { type LicensePackage } from './licenses'

View File

@@ -1,590 +0,0 @@
# @pnpm/cafs
## 7.0.5
### Patch Changes
- 250f7e9fe: When the same file is appended multiple times into a tarball, pick the last occurence, when unpacking the tarball.
- e958707b2: Improve performance by removing cryptographically generated id from temporary file names.
- @pnpm/fetcher-base@14.0.2
- @pnpm/store-controller-types@15.0.2
## 7.0.4
### Patch Changes
- b81cefdcd: Installation of a git-hosted dependency without `package.json` should not fail, when the dependency is read from cache [#6721](https://github.com/pnpm/pnpm/issues/6721).
## 7.0.3
### Patch Changes
- e57e2d340: Don't fail when a package is archived in a tarball with malformed tar headers [#5362](https://github.com/pnpm/pnpm/issues/5362).
## 7.0.2
### Patch Changes
- d55b41a8b: Dependencies have been updated.
- 614d5bd72: Don't use decompress-maybe.
## 7.0.1
### Patch Changes
- @pnpm/fetcher-base@14.0.1
- @pnpm/store-controller-types@15.0.1
## 7.0.0
### Major Changes
- eceaa8b8b: Node.js 14 support dropped.
### Patch Changes
- Updated dependencies [eceaa8b8b]
- @pnpm/store-controller-types@15.0.0
- @pnpm/fetcher-base@14.0.0
- @pnpm/graceful-fs@3.0.0
## 6.0.2
### Patch Changes
- Updated dependencies [955874422]
- @pnpm/graceful-fs@2.1.0
## 6.0.1
### Patch Changes
- @pnpm/fetcher-base@13.1.6
- @pnpm/store-controller-types@14.3.1
## 6.0.0
### Major Changes
- 98d6603f3: checkFilesIntegrity renamed to checkPkgFilesIntegrity and its API has changed.
### Patch Changes
- 98d6603f3: The store integrity check should validate the side effects cache of the installed package. If the side effects cache is broken, the package needs to be rebuilt [#4997](https://github.com/pnpm/pnpm/issues/4997).
## 5.0.6
### Patch Changes
- 1e6de89b6: Update ssri to v10.0.1.
## 5.0.5
### Patch Changes
- Updated dependencies [891a8d763]
- Updated dependencies [c7b05cd9a]
- @pnpm/store-controller-types@14.3.0
## 5.0.4
### Patch Changes
- Updated dependencies [2458741fa]
- @pnpm/store-controller-types@14.2.0
- @pnpm/fetcher-base@13.1.5
## 5.0.3
### Patch Changes
- a9d59d8bc: Update dependencies.
## 5.0.2
### Patch Changes
- @pnpm/fetcher-base@13.1.4
- @pnpm/store-controller-types@14.1.5
## 5.0.1
### Patch Changes
- @pnpm/fetcher-base@13.1.3
- @pnpm/store-controller-types@14.1.4
## 5.0.0
### Major Changes
- 043d988fc: Breaking change to the API. Defaul export is not used.
- f884689e0: Require `@pnpm/logger` v5.
## 4.3.2
### Patch Changes
- @pnpm/fetcher-base@13.1.2
- @pnpm/store-controller-types@14.1.3
## 4.3.1
### Patch Changes
- @pnpm/fetcher-base@13.1.1
- @pnpm/store-controller-types@14.1.2
## 4.3.0
### Minor Changes
- 745143e79: Extend cafs with `getFilePathByModeInCafs`.
### Patch Changes
- @pnpm/fetcher-base@13.1.0
- @pnpm/store-controller-types@14.1.1
## 4.2.1
### Patch Changes
- dbac0ca01: Update ssri to v9.
## 4.2.0
### Minor Changes
- 32915f0e4: Refactor cafs types into separate package and add additional properties including `cafsDir` and `getFilePathInCafs`.
### Patch Changes
- Updated dependencies [32915f0e4]
- Updated dependencies [23984abd1]
- @pnpm/fetcher-base@13.1.0
- @pnpm/store-controller-types@14.1.1
## 4.1.0
### Minor Changes
- c191ca7bf: Fix bug where the package manifest was not resolved if `verifyStoreIntegrity` is set to `false`.
## 4.0.9
### Patch Changes
- 39c040127: upgrade various dependencies
- Updated dependencies [65c4260de]
- @pnpm/store-controller-types@14.1.0
## 4.0.8
### Patch Changes
- @pnpm/fetcher-base@13.0.2
- @pnpm/store-controller-types@14.0.2
## 4.0.7
### Patch Changes
- @pnpm/fetcher-base@13.0.1
- @pnpm/store-controller-types@14.0.1
## 4.0.6
### Patch Changes
- Updated dependencies [2a34b21ce]
- Updated dependencies [47b5e45dd]
- @pnpm/fetcher-base@13.0.0
- @pnpm/store-controller-types@14.0.0
## 4.0.5
### Patch Changes
- Updated dependencies [0abfe1718]
- @pnpm/fetcher-base@12.1.0
- @pnpm/store-controller-types@13.0.4
## 4.0.4
### Patch Changes
- @pnpm/fetcher-base@12.0.3
- @pnpm/store-controller-types@13.0.3
## 4.0.3
### Patch Changes
- 6756c2b02: It should be possible to install a git-hosted package that has no `package.json` file [#4822](https://github.com/pnpm/pnpm/issues/4822).
- Updated dependencies [6756c2b02]
- @pnpm/fetcher-base@12.0.2
- @pnpm/store-controller-types@13.0.2
## 4.0.2
### Patch Changes
- cadefe5b6: Track the number of integrity checks.
## 4.0.1
### Patch Changes
- @pnpm/fetcher-base@12.0.1
- @pnpm/store-controller-types@13.0.1
## 4.0.0
### Major Changes
- 542014839: Node.js 12 is not supported.
### Patch Changes
- Updated dependencies [542014839]
- @pnpm/fetcher-base@12.0.0
- @pnpm/graceful-fs@2.0.0
- @pnpm/store-controller-types@13.0.0
## 3.0.15
### Patch Changes
- Updated dependencies [5c525db13]
- @pnpm/store-controller-types@12.0.0
## 3.0.14
### Patch Changes
- @pnpm/fetcher-base@11.1.6
- @pnpm/store-controller-types@11.0.12
## 3.0.13
### Patch Changes
- @pnpm/fetcher-base@11.1.5
- @pnpm/store-controller-types@11.0.11
## 3.0.12
### Patch Changes
- @pnpm/fetcher-base@11.1.4
- @pnpm/store-controller-types@11.0.10
## 3.0.11
### Patch Changes
- @pnpm/fetcher-base@11.1.3
- @pnpm/store-controller-types@11.0.9
## 3.0.10
### Patch Changes
- @pnpm/fetcher-base@11.1.2
- @pnpm/store-controller-types@11.0.8
## 3.0.9
### Patch Changes
- @pnpm/fetcher-base@11.1.1
- @pnpm/store-controller-types@11.0.7
## 3.0.8
### Patch Changes
- Updated dependencies [4ab87844a]
- Updated dependencies [4ab87844a]
- @pnpm/fetcher-base@11.1.0
- @pnpm/store-controller-types@11.0.6
## 3.0.7
### Patch Changes
- @pnpm/fetcher-base@11.0.3
- @pnpm/store-controller-types@11.0.5
## 3.0.6
### Patch Changes
- @pnpm/fetcher-base@11.0.2
- @pnpm/store-controller-types@11.0.4
## 3.0.5
### Patch Changes
- @pnpm/fetcher-base@11.0.1
- @pnpm/store-controller-types@11.0.3
## 3.0.4
### Patch Changes
- ef0ca24be: Use graceful-fs for reading files.
- Updated dependencies [a2aeeef88]
- @pnpm/graceful-fs@1.0.0
## 3.0.3
### Patch Changes
- Updated dependencies [e6a2654a2]
- Updated dependencies [e6a2654a2]
- @pnpm/fetcher-base@11.0.0
- @pnpm/store-controller-types@11.0.2
## 3.0.2
### Patch Changes
- @pnpm/fetcher-base@10.0.1
- @pnpm/store-controller-types@11.0.1
## 3.0.1
### Patch Changes
- 6f198457d: Update rename-overwrite.
## 3.0.0
### Major Changes
- 97b986fbc: Node.js 10 support is dropped. At least Node.js 12.17 is required for the package to work.
### Patch Changes
- 83645c8ed: Update ssri.
- Updated dependencies [97b986fbc]
- @pnpm/fetcher-base@10.0.0
- @pnpm/store-controller-types@11.0.0
## 2.1.0
### Minor Changes
- 8d1dfa89c: New fields added to `PackageFilesIndex`: `name` and `version`.
### Patch Changes
- Updated dependencies [8d1dfa89c]
- @pnpm/store-controller-types@10.0.0
## 2.0.5
### Patch Changes
- @pnpm/fetcher-base@9.0.4
- @pnpm/store-controller-types@9.2.1
## 2.0.4
### Patch Changes
- Updated dependencies [8698a7060]
- @pnpm/store-controller-types@9.2.0
- @pnpm/fetcher-base@9.0.3
## 2.0.3
### Patch Changes
- b3059f4f8: Don't unpack file duplicates to the content-addressable store.
## 2.0.2
### Patch Changes
- @pnpm/fetcher-base@9.0.2
- @pnpm/store-controller-types@9.1.2
## 2.0.1
### Patch Changes
- @pnpm/fetcher-base@9.0.1
- @pnpm/store-controller-types@9.1.1
## 2.0.0
### Major Changes
- 0a6544043: `generatingIntegrity` replaced with `writeResult`. When files are added to the store, the store returns not only the file's integrity as a result, but also the exact time when the file's content was verified with its integrity.
### Minor Changes
- 0a6544043: If a file in the store was never modified, we can skip checking its integrity.
### Patch Changes
- Updated dependencies [0a6544043]
- Updated dependencies [0a6544043]
- @pnpm/store-controller-types@9.1.0
- @pnpm/fetcher-base@9.0.0
## 1.0.8
### Patch Changes
- Updated dependencies [86cd72de3]
- @pnpm/store-controller-types@9.0.0
## 1.0.7
### Patch Changes
- 1525fff4c: Update get-stream to v6.
## 1.0.6
### Patch Changes
- a2ef8084f: Use the same versions of dependencies across the pnpm monorepo.
## 1.0.5
### Patch Changes
- @pnpm/fetcher-base@8.0.2
- @pnpm/store-controller-types@8.0.2
## 1.0.4
### Patch Changes
- @pnpm/fetcher-base@8.0.1
- @pnpm/store-controller-types@8.0.1
## 1.0.3
### Patch Changes
- 492805ee3: Strip byte order mark (BOM) before parsing the content of a package manifest (package.json).
## 1.0.2
### Patch Changes
- d3ddd023c: Update p-limit to v3.
## 1.0.1
### Patch Changes
- Updated dependencies [bcd4aa1aa]
- @pnpm/fetcher-base@8.0.0
## 1.0.0
### Major Changes
- 9596774f2: Store the package index files in the CAFS to reduce directory nesting.
- 7852deea3: Instead of creating a separate subdir for executables in the content-addressable storage, use the directory where all the files are stored but suffix the executable files with `-exec`. Also suffix the package index files with `-index.json`.
- b6a82072e: Project created.
- b6a82072e: Using a content-addressable filesystem for storing packages.
- 471149e66: Change the format of the package index file. Move all the files info into a "files" property.
### Minor Changes
- f516d266c: Executables are saved into a separate directory inside the content-addressable storage.
- a5febb913: sideEffects property added to files index file.
- 42e6490d1: When a new package is being added to the store, its manifest is streamed in the memory. So instead of reading the manifest from the filesystem, we can parse the stream from the memory.
### Patch Changes
- c207d994f: Update rename-overwrite to v3.
- Updated dependencies [16d1ac0fd]
- Updated dependencies [f516d266c]
- Updated dependencies [da091c711]
- Updated dependencies [42e6490d1]
- Updated dependencies [a5febb913]
- Updated dependencies [b6a82072e]
- Updated dependencies [802d145fc]
- Updated dependencies [a5febb913]
- Updated dependencies [a5febb913]
- Updated dependencies [a5febb913]
- Updated dependencies [42e6490d1]
- @pnpm/store-controller-types@8.0.0
- @pnpm/fetcher-base@7.0.0
## 1.0.0-alpha.5
### Minor Changes
- a5febb913: sideEffects property added to files index file.
### Patch Changes
- Updated dependencies [16d1ac0fd]
- Updated dependencies [a5febb913]
- Updated dependencies [a5febb913]
- Updated dependencies [a5febb913]
- Updated dependencies [a5febb913]
- @pnpm/store-controller-types@8.0.0-alpha.4
## 1.0.0-alpha.4
### Major Changes
- 471149e6: Change the format of the package index file. Move all the files info into a "files" property.
### Patch Changes
- @pnpm/fetcher-base@6.0.1-alpha.3
## 1.0.0-alpha.3
### Major Changes
- 9596774f2: Store the package index files in the CAFS to reduce directory nesting.
- 7852deea3: Instead of creating a separate subdir for executables in the content-addressable storage, use the directory where all the files are stored but suffix the executable files with `-exec`. Also suffix the package index files with `-index.json`.
## 1.0.0-alpha.2
### Minor Changes
- 42e6490d1: When a new package is being added to the store, its manifest is streamed in the memory. So instead of reading the manifest from the filesystem, we can parse the stream from the memory.
### Patch Changes
- c207d994f: Update rename-overwrite to v3.
- Updated dependencies [42e6490d1]
- @pnpm/fetcher-base@7.0.0-alpha.2
## 1.0.0-alpha.1
### Minor Changes
- 4f62d0383: Executables are saved into a separate directory inside the content-addressable storage.
### Patch Changes
- Updated dependencies [4f62d0383]
- @pnpm/fetcher-base@7.0.0-alpha.1
## 1.0.0-alpha.0
### Major Changes
- 91c4b5954: Project created.
- 91c4b5954: Using a content-addressable filesystem for storing packages.
### Patch Changes
- Updated dependencies [91c4b5954]
- @pnpm/fetcher-base@7.0.0-alpha.0

View File

@@ -1,15 +1,15 @@
# @pnpm/cafs
# @pnpm/store.cafs
> A content-addressable filesystem for the packages storage
<!--@shields('npm')-->
[![npm version](https://img.shields.io/npm/v/@pnpm/cafs.svg)](https://www.npmjs.com/package/@pnpm/cafs)
[![npm version](https://img.shields.io/npm/v/@pnpm/store.cafs.svg)](https://www.npmjs.com/package/@pnpm/store.cafs)
<!--/@-->
## Installation
```sh
pnpm add @pnpm/cafs
pnpm add @pnpm/store.cafs
```
## License

View File

@@ -1,6 +1,6 @@
{
"name": "@pnpm/cafs",
"version": "7.0.5",
"name": "@pnpm/store.cafs",
"version": "0.0.0",
"description": "A content-addressable filesystem for the packages storage",
"main": "lib/index.js",
"types": "lib/index.d.ts",
@@ -32,7 +32,7 @@
"tar-stream": "^2.2.0"
},
"devDependencies": {
"@pnpm/cafs": "workspace:*",
"@pnpm/store.cafs": "workspace:*",
"@pnpm/cafs-types": "workspace:*",
"@pnpm/types": "workspace:*",
"@types/concat-stream": "^2.0.0",

View File

@@ -15,7 +15,7 @@
"@pnpm/logger": "^5.0.0"
},
"dependencies": {
"@pnpm/cafs": "workspace:*",
"@pnpm/store.cafs": "workspace:*",
"@pnpm/fetcher-base": "workspace:*",
"@pnpm/fs.indexed-pkg-importer": "workspace:*",
"@pnpm/store-controller-types": "workspace:*",

View File

@@ -4,7 +4,7 @@ import {
type CafsLocker,
createCafs,
getFilePathByModeInCafs,
} from '@pnpm/cafs'
} from '@pnpm/store.cafs'
import type { Cafs, PackageFilesResponse } from '@pnpm/cafs-types'
import { createIndexedPkgImporter } from '@pnpm/fs.indexed-pkg-importer'
import {

View File

@@ -15,7 +15,7 @@
"@pnpm/logger": "^5.0.0"
},
"dependencies": {
"@pnpm/cafs": "workspace:*",
"@pnpm/store.cafs": "workspace:*",
"@pnpm/create-cafs-store": "workspace:*",
"@pnpm/fetcher-base": "workspace:*",
"@pnpm/package-requester": "workspace:*",

View File

@@ -1,6 +1,6 @@
import {
type PackageFilesIndex,
} from '@pnpm/cafs'
} from '@pnpm/store.cafs'
import { createCafsStore, type CafsLocker } from '@pnpm/create-cafs-store'
import { type Fetchers } from '@pnpm/fetcher-base'
import { createPackageRequester } from '@pnpm/package-requester'

View File

@@ -1,6 +1,6 @@
import { promises as fs } from 'fs'
import path from 'path'
import { type PackageFilesIndex } from '@pnpm/cafs'
import { type PackageFilesIndex } from '@pnpm/store.cafs'
import { globalInfo, globalWarn } from '@pnpm/logger'
import rimraf from '@zkochan/rimraf'
import loadJsonFile from 'load-json-file'

View File

@@ -45,7 +45,7 @@
"tempy": "^1.0.1"
},
"dependencies": {
"@pnpm/cafs": "workspace:*",
"@pnpm/store.cafs": "workspace:*",
"@pnpm/cli-utils": "workspace:*",
"@pnpm/config": "workspace:*",
"@pnpm/dependency-path": "workspace:*",

View File

@@ -1,5 +1,5 @@
import path from 'path'
import { getFilePathInCafs, type PackageFilesIndex } from '@pnpm/cafs'
import { getFilePathInCafs, type PackageFilesIndex } from '@pnpm/store.cafs'
import { getContextForSingleImporter } from '@pnpm/get-context'
import {
nameVerFromPkgSnapshot,