0
Fork 0
mirror of https://github.com/verdaccio/verdaccio.git synced 2024-12-30 22:34:10 -05:00
verdaccio/test/unit/modules
贾顺名(Jarvis) b5ac3c0f28
fix: publish with deprecated field (#2771)
* fix: publish with deprecated field by @Jiasm 

When publish with deprecated field in `package.json`, that will make all old versions miss.

Examples:

I have package@1.0.0 and package@1.0.1.

When `npm deprecate package@1.0.0 "xxx"`, Verdaccio will recived:

```json
{
  "name": "module_name",
  "version": {
    "1.0.0": {
      "deprecated": "xxx"
    },
    "1.0.1": {}
  }
}
```

⬆️ This make sense

But then publish new version with @1.0.2.

Verdaccio will recived:

```json
{
  "name": "module_name",
  "version": {
    "1.0.2": {
      "deprecated": "xxx" // if we set this field in package.json
    },
  }
}
```

and that metadata will override package.json, make old version miss.

migrate from #2766

* remove spaces

* fix: ignore empty package case

* fix: cover normal unpublish case

* refactor: Optimize check logic for lazy execution

* test: upgrade Jest Snapshot

* fix: set storage.getPackage `uplinksLook: false`.

* feat: use `_attachments` to distinguish deprecate

* test: rollback test snapshots

* test: rollback jest snapshots

* test: publish new version with deprecate field

* test: remove space
2021-12-16 16:17:52 +01:00
..
access build: enable pnp yarn2 (#2253) 2021-05-13 23:13:57 +02:00
api fix: publish with deprecated field (#2771) 2021-12-16 16:17:52 +01:00
auth build: enable pnp yarn2 (#2253) 2021-05-13 23:13:57 +02:00
cli build: enable pnp yarn2 (#2253) 2021-05-13 23:13:57 +02:00
config feat: replace bunyan by pino.js (#2148) 2021-03-30 20:32:46 +02:00
notifications chore: update eslint dependencies (#2126) 2021-03-14 08:42:46 +01:00
plugin build: enable pnp yarn2 (#2253) 2021-05-13 23:13:57 +02:00
search fix: scoped query support (#2208) 2021-04-28 07:18:30 +02:00
storage build: enable pnp yarn2 (#2253) 2021-05-13 23:13:57 +02:00
uplinks build: enable pnp yarn2 (#2253) 2021-05-13 23:13:57 +02:00
utils fix: improve get headers from request #2190 (#2271) 2021-05-26 20:07:13 +02:00
web fix: restore using local path web logo (#2270) 2021-05-22 14:46:47 +02:00
basic_system.spec.ts test: system test add logging for debuggin 2021-10-24 10:15:54 +02:00