Skip to content

Commit 2218b74

Browse files
@jotadevelopersergiohgz
authored andcommitted
feat: remove flow #70
BREAKING CHANGE: remove flow definitions
1 parent 5f61009 commit 2218b74

File tree

15 files changed

+630
-2777
lines changed

15 files changed

+630
-2777
lines changed

core/types/.eslintignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
lib/
22
.idea/
33
**/node_modules/**
4-
**/__*-fixtures__/**
4+
/**/*.d.ts

core/types/.eslintrc

Lines changed: 0 additions & 13 deletions
This file was deleted.

core/types/.flowconfig

Lines changed: 0 additions & 26 deletions
This file was deleted.

core/types/.gitignore

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,6 @@ npm-debug.log
44
lib/
55
node_modules/
66

7-
# Istanbul
8-
.nyc*
9-
tests-report
10-
117
# IDE
128
.vscode/*
139
.idea/

core/types/.npmignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,6 @@ test/
1414
.travis.yml
1515
src/
1616
.idea/
17+
.github/
18+
scripts/
19+
.DS_Store

core/types/.prettierrc

Lines changed: 0 additions & 12 deletions
This file was deleted.

core/types/README.md

Lines changed: 3 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# Flow/Typescript types for Verdaccio
1+
# Typescript types for Verdaccio
22

3-
Typescript / Flow definitions for verdaccio plugins and internal code
3+
Typescript definitions for verdaccio plugins and internal code
44

55
# Typescript
66
For usage with the library, the `tsconfig.json` should looks like this. Typescript is only available since `"@verdaccio/types": "5.0.0-beta.2"`.
@@ -29,20 +29,6 @@ For usage with the library, the `tsconfig.json` should looks like this. Typescri
2929
}
3030
```
3131

32-
# Flow
33-
34-
## Usage
35-
36-
To set up the types we need to add them to the `.flowconfig` flow configuration file.
37-
38-
```
39-
[libs]
40-
node_modules/@verdaccio/types/lib/
41-
42-
[options]
43-
suppress_comment= \\(.\\|\n\\)*\\$FlowFixMe
44-
```
45-
4632
### Imports
4733

4834
```
@@ -55,7 +41,7 @@ import type {ILocalData, LocalStorage, Logger, Config} from '@verdaccio/types';
5541
data: LocalStorage;
5642
config: Config;
5743
locked: boolean;
58-
...
44+
...
5945
}
6046
```
6147

core/types/index.d.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
import { Stream, PassThrough } from "stream";
22

33
declare module "@verdaccio/types" {
4-
type StringValue = string | void | null;
5-
4+
type StringValue = string | void | null;
65

76
type StorageList = Array<string>;
87
type Callback = Function;
@@ -460,7 +459,7 @@ type StringValue = string | void | null;
460459
allow_publish?(user: RemoteUser, pkg: T & PackageAccess, cb: Callback): void;
461460
allow_access?(user: RemoteUser, pkg: AllowAccess & PackageAccess, cb: Callback): void;
462461
allow_publish?(user: RemoteUser, pkg: AllowAccess & PackageAccess, cb: Callback): void;
463-
allow_unpublish?(user: RemoteUser, pkg: AllowAccess & PackageAccess, cb: Callback): void;s
462+
allow_unpublish?(user: RemoteUser, pkg: AllowAccess & PackageAccess, cb: Callback): void;
464463
apiJWTmiddleware?(helpers : any): Function;
465464
}
466465

core/types/package.json

Lines changed: 10 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,12 @@
66
"type": "git",
77
"url": "git://github.com/verdaccio/flow-types"
88
},
9-
"main": "lib/types.js.flow",
9+
"main": "index.d.ts",
10+
"types": "index.d.ts",
1011
"scripts": {
11-
"precommit": "lint-staged",
12-
"lint": "eslint .",
13-
"prepublish": "npm run build",
14-
"format": "prettier --write",
12+
"test": "tsc --noEmit",
1513
"release": "standard-version -a -s",
16-
"build": "npm run build:flow",
17-
"build:flow": "mkdir -p lib && cp src/flow/types.js lib/types.js.flow",
18-
"test": "npm run lint && flow check"
14+
"build": "echo \"no buid required\""
1915
},
2016
"keywords": [
2117
"flow-type",
@@ -26,37 +22,11 @@
2622
"private": false,
2723
"license": "MIT",
2824
"devDependencies": {
29-
"@octokit/rest": "^16.25.0",
30-
"@types/node": "10.12.18",
31-
"babel-eslint": "10.0.1",
32-
"eslint": "5.12.0",
33-
"eslint-config-prettier": "3.3.0",
34-
"eslint-plugin-flow-typed": "1.0.1",
35-
"eslint-plugin-flowtype": "3.2.1",
36-
"eslint-plugin-prettier": "3.0.1",
37-
"flow-bin": "0.90.0",
38-
"get-stdin": "^7.0.0",
39-
"husky": "0.14.3",
40-
"lint-staged": "8.1.0",
41-
"prettier": "1.15.3",
42-
"standard-version": "4.4.0",
43-
"typescript": "3.2.4"
44-
},
45-
"peerDependencies": {
46-
"@types/node": "10.12.18",
47-
"flow-bin": "0.90.0",
48-
"typescript": "3.2.4"
49-
},
50-
"lint-staged": {
51-
"linters": {
52-
"package.json": [
53-
"prettier --write",
54-
"git add"
55-
],
56-
"*.js": [
57-
"eslint --fix",
58-
"git add"
59-
]
60-
}
25+
"@octokit/rest": "^16.28.6",
26+
"@types/node": "12.6.8",
27+
"get-stdin": "7.0.0",
28+
"husky": "3.0.1",
29+
"standard-version": "6.0.1",
30+
"typescript": "^3.5.3"
6131
}
6232
}

core/types/renovate.json

Lines changed: 0 additions & 5 deletions
This file was deleted.

0 commit comments

Comments
 (0)