Skip to content

Commit

Permalink
split local-storage packages (#708)
Browse files Browse the repository at this point in the history
* restore package

* test

* test
  • Loading branch information
juanpicado authored Mar 16, 2024
1 parent 772350f commit d8a22b0
Show file tree
Hide file tree
Showing 41 changed files with 2,182 additions and 5 deletions.
5 changes: 5 additions & 0 deletions .changeset/real-kangaroos-listen.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@verdaccio/local-storage-legacy': patch
---

restore package
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ jobs:
fail-fast: true
matrix:
os: [ubuntu-latest]
node_version: [16, 18, 20]
node_version: [16, 18, 20, 21]
name: ${{ matrix.os }} / Node ${{ matrix.node_version }}
runs-on: ${{ matrix.os }}
steps:
Expand Down
3 changes: 3 additions & 0 deletions plugins/local-storage-legacy/.babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": "../../.babelrc"
}
2 changes: 2 additions & 0 deletions plugins/local-storage-legacy/.eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
lib/
__fixtures__/
2 changes: 2 additions & 0 deletions plugins/local-storage-legacy/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
_storage/
lib/
7 changes: 7 additions & 0 deletions plugins/local-storage-legacy/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Change Log

## 11.0.1

### Patch Changes

- 52f0a2d: feat!: rename package
21 changes: 21 additions & 0 deletions plugins/local-storage-legacy/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2019 Verdaccio

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
51 changes: 51 additions & 0 deletions plugins/local-storage-legacy/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# @verdaccio/local-storage-legacy

> Only used by 5.x versions
📦 File system storage plugin for verdaccio

[![verdaccio (latest)](https://img.shields.io/npm/v/@verdaccio/local-storage/latest.svg)](https://www.npmjs.com/package/@verdaccio/local-storage)
[![CircleCI](https://circleci.com/gh/verdaccio/local-storage/tree/master.svg?style=svg)](https://circleci.com/gh/verdaccio/local-storage/tree/master)
[![Known Vulnerabilities](https://snyk.io/test/github/verdaccio/local-storage/badge.svg?targetFile=package.json)](https://snyk.io/test/github/verdaccio/local-storage?targetFile=package.json)
[![codecov](https://codecov.io/gh/verdaccio/local-storage/branch/master/graph/badge.svg)](https://codecov.io/gh/verdaccio/local-storage)
[![backers](https://opencollective.com/verdaccio/tiers/backer/badge.svg?label=Backer&color=brightgreen)](https://opencollective.com/verdaccio)
[![discord](https://img.shields.io/discord/388674437219745793.svg)](http://chat.verdaccio.org/)
![MIT](https://img.shields.io/github/license/mashape/apistatus.svg)
[![node](https://img.shields.io/node/v/@verdaccio/local-storage/latest.svg)](https://www.npmjs.com/package/@verdaccio/local-storage)

> This package is already built-in in verdaccio
```
npm install @verdaccio/local-storage
```

### API

### LocalDatabase

The main object that handle a JSON database the private packages.

#### Constructor

```
new LocalDatabase(config, logger);
```

* **config**: A verdaccio configuration instance.
* **logger**: A logger instance

### LocalFS

A class that handle an package instance in the File System

```
new LocalFS(packageStoragePath, logger);
```



## License
Verdaccio is [MIT licensed](https://github.com/verdaccio/local-storage/blob/master/LICENSE).


[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fverdaccio%2Flocal-storage.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fverdaccio%2Flocal-storage?ref=badge_large)
10 changes: 10 additions & 0 deletions plugins/local-storage-legacy/jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
module.exports = {
name: 'local-storage-jest',
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx'],
transform: {
'^.+\\.(js|jsx|ts|tsx)$': 'babel-jest',
},
verbose: true,
collectCoverage: true,
coveragePathIgnorePatterns: ['node_modules', '_storage', 'fixtures', 'lib'],
};
1 change: 1 addition & 0 deletions plugins/local-storage-legacy/jestEnvironment.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
jest.requireActual('babel/polyfill');
62 changes: 62 additions & 0 deletions plugins/local-storage-legacy/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
{
"name": "@verdaccio/local-storage-legacy",
"version": "11.0.1",
"description": "Local storage implementation",
"keywords": [
"plugin",
"verdaccio",
"storage",
"local-storage"
],
"author": "Juan Picado <juanpicado19@gmail.com>",
"license": "MIT",
"homepage": "https://verdaccio.org",
"repository": {
"type": "git",
"url": "https://github.com/verdaccio/monorepo",
"directory": "plugins/local-storage"
},
"bugs": {
"url": "https://github.com/verdaccio/monorepo/issues"
},
"publishConfig": {
"access": "public"
},
"main": "lib/index.js",
"types": "lib/index.d.ts",
"files": [
"lib/"
],
"engines": {
"node": ">=12"
},
"dependencies": {
"@verdaccio/commons-api": "10.2.0",
"@verdaccio/file-locking": "workspace:10.3.1",
"@verdaccio/streams": "workspace:10.2.1",
"debug": "4.3.4",
"async": "3.2.4",
"lodash": "4.17.21",
"lowdb": "1.0.0",
"mkdirp": "1.0.4"
},
"devDependencies": {
"@types/minimatch": "^3.0.3",
"@types/node": "^20.5.8",
"@verdaccio/legacy-types": "workspace:1.0.1",
"minimatch": "^4.0.0",
"rmdir-sync": "^1.0.1"
},
"scripts": {
"clean": "rimraf ./build",
"test": "cross-env NODE_ENV=test BABEL_ENV=test jest",
"type-check": "tsc --noEmit -p tsconfig.build.json",
"build:types": "tsc --emitDeclarationOnly -p tsconfig.build.json",
"build:js": "babel src/ --out-dir lib/ --copy-files --extensions \".ts,.tsx\" --source-maps",
"build": "pnpm run build:js && pnpm run build:types"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/verdaccio"
}
}
5 changes: 5 additions & 0 deletions plugins/local-storage-legacy/src/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import LocalDatabase from './local-database';

export { LocalDatabase };

export default LocalDatabase;
Loading

0 comments on commit d8a22b0

Please sign in to comment.