@itcase/types 1.0.2 → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +10 -0
- package/package.json +13 -10
- package/types/common.ts +45 -0
- package/types/index.ts +1 -0
- package/.editorconfig +0 -35
- package/.github/workflows/publish.yaml +0 -33
- package/.husky/check_message +0 -5
- package/.husky/post-commit +0 -14
- package/.husky/post-merge +0 -14
- package/.husky/pre-commit +0 -6
- package/.husky/pre-push +0 -14
- package/.husky/set_release_message +0 -43
- package/commitlint.config.mjs +0 -3
- package/eslint.config.mjs +0 -3
- package/index.ts +0 -1
- package/lint-staged.config.mjs +0 -3
- package/prettier.config.mjs +0 -3
- package/release.config.mjs +0 -3
- package/tsconfig.json +0 -23
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,13 @@
|
|
|
1
|
+
## [1.0.3](https://github.com/ITCase/itcase-types/compare/v1.0.2...v1.0.3) (2025-05-13)
|
|
2
|
+
|
|
3
|
+
### Fixes
|
|
4
|
+
|
|
5
|
+
* add files to git ([a9bd6a6](https://github.com/ITCase/itcase-types/commit/a9bd6a613ec8e161179a7553d25232728fdd19e0))
|
|
6
|
+
|
|
7
|
+
### Features
|
|
8
|
+
|
|
9
|
+
* add simple "common" types ([e797bc4](https://github.com/ITCase/itcase-types/commit/e797bc4701a4e8f6e9f357b5ab7c7868f7b6c742))
|
|
10
|
+
|
|
1
11
|
## [1.0.2](https://github.com/ITCase/itcase-types/compare/v1.0.1...v1.0.2) (2025-04-21)
|
|
2
12
|
|
|
3
13
|
### Bug Fixes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@itcase/types",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.3",
|
|
4
4
|
"description": "unified type storage",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"types"
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"license": "MIT",
|
|
9
9
|
"private": false,
|
|
10
10
|
"exports": {
|
|
11
|
-
".": "./index.ts"
|
|
11
|
+
".": "./types/index.ts"
|
|
12
12
|
},
|
|
13
13
|
"scripts": {
|
|
14
14
|
"lint": "eslint types/",
|
|
@@ -16,6 +16,11 @@
|
|
|
16
16
|
"prepare": "husky",
|
|
17
17
|
"semantic-release": "semantic-release"
|
|
18
18
|
},
|
|
19
|
+
"files": [
|
|
20
|
+
"types",
|
|
21
|
+
"README.md",
|
|
22
|
+
"CHANGELOG.md"
|
|
23
|
+
],
|
|
19
24
|
"repository": {
|
|
20
25
|
"type": "git",
|
|
21
26
|
"url": "https://github.com/ITCase/itcase-types.git"
|
|
@@ -24,20 +29,18 @@
|
|
|
24
29
|
"access": "public",
|
|
25
30
|
"registry": "https://registry.npmjs.org/"
|
|
26
31
|
},
|
|
27
|
-
"dependencies": {
|
|
28
|
-
"@itcase/config": "^1.0.26"
|
|
29
|
-
},
|
|
30
32
|
"devDependencies": {
|
|
31
|
-
"@commitlint/cli": "^19.8.
|
|
32
|
-
"@commitlint/config-conventional": "^19.8.
|
|
33
|
-
"@itcase/
|
|
33
|
+
"@commitlint/cli": "^19.8.1",
|
|
34
|
+
"@commitlint/config-conventional": "^19.8.1",
|
|
35
|
+
"@itcase/config": "^1.0.41",
|
|
36
|
+
"@itcase/lint": "^1.1.9",
|
|
34
37
|
"@semantic-release/changelog": "^6.0.3",
|
|
35
38
|
"@semantic-release/git": "^10.0.1",
|
|
36
39
|
"@semantic-release/release-notes-generator": "14.0.3",
|
|
37
40
|
"conventional-changelog-conventionalcommits": "^8.0.0",
|
|
38
|
-
"eslint": "9.
|
|
41
|
+
"eslint": "9.26.0",
|
|
39
42
|
"husky": "^9.1.7",
|
|
40
|
-
"lint-staged": "^
|
|
43
|
+
"lint-staged": "^16.0.0",
|
|
41
44
|
"prettier": "^3.5.3",
|
|
42
45
|
"semantic-release": "^24.2.3",
|
|
43
46
|
"typescript": "^5.8.3"
|
package/types/common.ts
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Used for objects unique identifier as "id" property. Sometime id may be
|
|
3
|
+
* generated as random string(uuid) or number from the rest-api response.
|
|
4
|
+
* Or in some cases when JS convert number to string, e.g. cookies, search-params, etc.
|
|
5
|
+
*/
|
|
6
|
+
type Id = number | string
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Date
|
|
10
|
+
* @format ISO date: "2024-01-31"
|
|
11
|
+
*/
|
|
12
|
+
type DateIso = string
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Date and time
|
|
16
|
+
* @format ISO date and time: "2024-01-31T23:00:59.322230+03:00"
|
|
17
|
+
*/
|
|
18
|
+
type DateTimeIso = string
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* URL to file. E.g.: in django media folder
|
|
22
|
+
* @format relative URL: "/media/uploads/{...}/file_name.png"
|
|
23
|
+
*/
|
|
24
|
+
type ImageRelativeUrl = string
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* URL to file. E.g.: in django media folder
|
|
28
|
+
* @format absolute URL: "https://itcase.pro/media/uploads/{...}/file_name.png"
|
|
29
|
+
*/
|
|
30
|
+
type ImageAbsoluteUrl = string
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Simple callback function that takes no arguments and returns nothing.
|
|
34
|
+
* This type is used for basic event handlers or asynchronous operations.
|
|
35
|
+
*/
|
|
36
|
+
type SimpleCallback = () => void
|
|
37
|
+
|
|
38
|
+
export type {
|
|
39
|
+
Id,
|
|
40
|
+
DateIso,
|
|
41
|
+
DateTimeIso,
|
|
42
|
+
ImageRelativeUrl,
|
|
43
|
+
ImageAbsoluteUrl,
|
|
44
|
+
SimpleCallback,
|
|
45
|
+
}
|
package/types/index.ts
CHANGED
package/.editorconfig
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
# editorconfig.org
|
|
2
|
-
root = true
|
|
3
|
-
|
|
4
|
-
[*]
|
|
5
|
-
indent_style = space
|
|
6
|
-
indent_size = 2
|
|
7
|
-
end_of_line = lf
|
|
8
|
-
charset = utf-8
|
|
9
|
-
trim_trailing_whitespace = true
|
|
10
|
-
insert_final_newline = true
|
|
11
|
-
|
|
12
|
-
[*.{css,js,jsx,mjs,ts,tsx}]
|
|
13
|
-
indent_style = space
|
|
14
|
-
indent_size = 2
|
|
15
|
-
tab_size = 2
|
|
16
|
-
end_of_line = lf
|
|
17
|
-
charset = utf-8
|
|
18
|
-
trim_trailing_whitespace = true
|
|
19
|
-
insert_final_newline = true
|
|
20
|
-
|
|
21
|
-
[*.{html,py}]
|
|
22
|
-
indent_style = space
|
|
23
|
-
indent_size = 4
|
|
24
|
-
end_of_line = lf
|
|
25
|
-
charset = utf-8
|
|
26
|
-
trim_trailing_whitespace = true
|
|
27
|
-
insert_final_newline = true
|
|
28
|
-
|
|
29
|
-
[*.md]
|
|
30
|
-
trim_trailing_whitespace = false
|
|
31
|
-
|
|
32
|
-
[Makefile]
|
|
33
|
-
indent_style = tab
|
|
34
|
-
indent_size = 4
|
|
35
|
-
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
name: "Publish Package to NPM Registry"
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
push:
|
|
5
|
-
branches:
|
|
6
|
-
- master
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
jobs:
|
|
10
|
-
publish-npm:
|
|
11
|
-
runs-on: ubuntu-latest
|
|
12
|
-
env:
|
|
13
|
-
GIT_WORKFLOW: true
|
|
14
|
-
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
15
|
-
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
16
|
-
|
|
17
|
-
steps:
|
|
18
|
-
- name: "Make Checkout"
|
|
19
|
-
uses: actions/checkout@v3
|
|
20
|
-
with:
|
|
21
|
-
fetch-depth: 0
|
|
22
|
-
|
|
23
|
-
- name: "Setup NodeJS"
|
|
24
|
-
uses: actions/setup-node@v3
|
|
25
|
-
with:
|
|
26
|
-
node-version: 20
|
|
27
|
-
|
|
28
|
-
- name: "Install dependencies"
|
|
29
|
-
run: npm install --force
|
|
30
|
-
|
|
31
|
-
- name: "Publish package"
|
|
32
|
-
shell: bash
|
|
33
|
-
run: npm run semantic-release
|
package/.husky/check_message
DELETED
package/.husky/post-commit
DELETED
package/.husky/post-merge
DELETED
package/.husky/pre-commit
DELETED
package/.husky/pre-push
DELETED
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
#!/bin/bash
|
|
2
|
-
|
|
3
|
-
exec < /dev/tty
|
|
4
|
-
|
|
5
|
-
function update_message {
|
|
6
|
-
commit_message=$(git log --format=%B -n 1)
|
|
7
|
-
new_commit_message="${1}: ${commit_message}"
|
|
8
|
-
git commit --amend -m "${new_commit_message}"
|
|
9
|
-
git log --format=%B -n 1
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
PS3='Select release type: '
|
|
14
|
-
|
|
15
|
-
MAJOR='MAJOR version when you make incompatible API changes'
|
|
16
|
-
MINOR='MINOR version when you add functionality in a backwards compatible manner'
|
|
17
|
-
PATCH='PATCH version when you make backwards compatible bug fixes'
|
|
18
|
-
CANCEL='Cancel'
|
|
19
|
-
|
|
20
|
-
options=("${MAJOR}" "${MINOR}" "${PATCH}" "${CANCEL}")
|
|
21
|
-
select opt in "${options[@]}"
|
|
22
|
-
do
|
|
23
|
-
case $opt in
|
|
24
|
-
$MAJOR)
|
|
25
|
-
update_message 'major'
|
|
26
|
-
exit 0
|
|
27
|
-
;;
|
|
28
|
-
$MINOR)
|
|
29
|
-
update_message 'minor'
|
|
30
|
-
exit 0
|
|
31
|
-
;;
|
|
32
|
-
$PATCH)
|
|
33
|
-
update_message 'patch'
|
|
34
|
-
exit 0
|
|
35
|
-
;;
|
|
36
|
-
$CANCEL)
|
|
37
|
-
exit 1
|
|
38
|
-
;;
|
|
39
|
-
*) echo "invalid option $REPLY";;
|
|
40
|
-
esac
|
|
41
|
-
done
|
|
42
|
-
|
|
43
|
-
< /dev/tty
|
package/commitlint.config.mjs
DELETED
package/eslint.config.mjs
DELETED
package/index.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './types/index'
|
package/lint-staged.config.mjs
DELETED
package/prettier.config.mjs
DELETED
package/release.config.mjs
DELETED
package/tsconfig.json
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
// Enforce consistent file casing
|
|
4
|
-
"forceConsistentCasingInFileNames": true,
|
|
5
|
-
// Treat each file as a separate module
|
|
6
|
-
"isolatedModules": true,
|
|
7
|
-
// Resolve modules using Node.js resolution algorithm
|
|
8
|
-
"moduleResolution": "node",
|
|
9
|
-
// Do not emit output files (for checking only)
|
|
10
|
-
"noEmit": true,
|
|
11
|
-
// Skip type checking of declaration files
|
|
12
|
-
"skipLibCheck": true,
|
|
13
|
-
// Enable strict type-checking options
|
|
14
|
-
"strict": true
|
|
15
|
-
},
|
|
16
|
-
// Include files from the 'src' directory for compilation
|
|
17
|
-
"include": [
|
|
18
|
-
"types"
|
|
19
|
-
],
|
|
20
|
-
"exclude": [
|
|
21
|
-
"node_modules/**"
|
|
22
|
-
]
|
|
23
|
-
}
|