@lbd-sh/date-tz 1.0.5 → 1.0.7
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/.github/workflows/production.yaml +70 -0
- package/.vscode/launch.json +15 -0
- package/.vscode/settings.json +9 -0
- package/.vscode/tasks.json +13 -0
- package/.vscode/tsconfig.json +12 -0
- package/GitVersion.yml +108 -0
- package/README.md +194 -168
- package/merge.cmd +18 -0
- package/package.json +1 -1
- package/src/date-tz.spec.ts +213 -0
- package/src/date-tz.ts +752 -0
- package/src/idate-tz.ts +23 -0
- package/{index.d.ts → src/index.ts} +1 -0
- package/src/timezones.ts +592 -0
- package/tsconfig.json +30 -0
- package/date-tz.d.ts +0 -41
- package/date-tz.js +0 -503
- package/date-tz.js.map +0 -1
- package/idate-tz.d.ts +0 -22
- package/idate-tz.js +0 -3
- package/idate-tz.js.map +0 -1
- package/index.js +0 -20
- package/index.js.map +0 -1
- package/timezones.d.ts +0 -8
- package/timezones.js +0 -594
- package/timezones.js.map +0 -1
- package/tsconfig.tsbuildinfo +0 -1
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
name: Release
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
workflow_dispatch:
|
|
5
|
+
push:
|
|
6
|
+
branches:
|
|
7
|
+
- master
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
publish:
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
|
+
permissions:
|
|
13
|
+
contents: write
|
|
14
|
+
packages: write
|
|
15
|
+
steps:
|
|
16
|
+
- name: Checkout
|
|
17
|
+
uses: actions/checkout@v4
|
|
18
|
+
- name: Setup Node
|
|
19
|
+
uses: actions/setup-node@v4
|
|
20
|
+
with:
|
|
21
|
+
node-version: "22.x"
|
|
22
|
+
registry-url: "https://registry.npmjs.org/"
|
|
23
|
+
scope: "@lbd-sh"
|
|
24
|
+
- name: Configure npm authentication
|
|
25
|
+
env:
|
|
26
|
+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
27
|
+
run: |
|
|
28
|
+
echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc
|
|
29
|
+
echo "always-auth=true" >> ~/.npmrc
|
|
30
|
+
- name: Install dependencies
|
|
31
|
+
run: npm ci
|
|
32
|
+
- name: Build library
|
|
33
|
+
run: npm run build
|
|
34
|
+
- name: Compute next patch version
|
|
35
|
+
id: version
|
|
36
|
+
run: |
|
|
37
|
+
set -euo pipefail
|
|
38
|
+
current_pkg=$(jq -r '.version' package.json)
|
|
39
|
+
latest=$(npm view @lbd-sh/date-tz version 2>/dev/null || echo "0.0.0")
|
|
40
|
+
echo "Package.json version: $current_pkg"
|
|
41
|
+
echo "Latest published version: $latest"
|
|
42
|
+
base="$latest"
|
|
43
|
+
IFS=. read -r maj min pat <<< "$base"
|
|
44
|
+
pat=$((pat + 1))
|
|
45
|
+
next="$maj.$min.$pat"
|
|
46
|
+
if [ "$next" = "$current_pkg" ]; then
|
|
47
|
+
# If package.json already at that version, bump again
|
|
48
|
+
IFS=. read -r maj min pat <<< "$next"
|
|
49
|
+
pat=$((pat + 1))
|
|
50
|
+
next="$maj.$min.$pat"
|
|
51
|
+
fi
|
|
52
|
+
echo "Next version: $next"
|
|
53
|
+
echo "publish_version=$next" >> "$GITHUB_OUTPUT"
|
|
54
|
+
- name: Bump version in package.json
|
|
55
|
+
run: npm version ${{ steps.version.outputs.publish_version }} --git-tag-version false
|
|
56
|
+
- name: Commit version bump
|
|
57
|
+
uses: stefanzweifel/git-auto-commit-action@v5
|
|
58
|
+
with:
|
|
59
|
+
commit_message: "chore(release): bump version to ${{ steps.version.outputs.publish_version }}"
|
|
60
|
+
file_pattern: |
|
|
61
|
+
package.json
|
|
62
|
+
package-lock.json
|
|
63
|
+
- name: Publish to npm
|
|
64
|
+
env:
|
|
65
|
+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
66
|
+
run: npm publish --access public
|
|
67
|
+
- name: Create git tag
|
|
68
|
+
run: |
|
|
69
|
+
git tag "v${{ steps.version.outputs.publish_version }}"
|
|
70
|
+
git push --tags
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "0.2.0",
|
|
3
|
+
"configurations": [
|
|
4
|
+
{
|
|
5
|
+
"name": "Debug TypeScript",
|
|
6
|
+
"type": "node",
|
|
7
|
+
"request": "launch",
|
|
8
|
+
"program": "${workspaceFolder}/dist/index.js",
|
|
9
|
+
"preLaunchTask": "tsc: build",
|
|
10
|
+
"outFiles": ["${workspaceFolder}/dist/**/*.js"],
|
|
11
|
+
"sourceMaps": true,
|
|
12
|
+
"skipFiles": ["<node_internals>/**"]
|
|
13
|
+
}
|
|
14
|
+
]
|
|
15
|
+
}
|
package/GitVersion.yml
ADDED
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
mode: ContinuousDeployment
|
|
2
|
+
major-version-bump-message: (^|\s+)(breaking|major)(:?\s+)?
|
|
3
|
+
minor-version-bump-message: (^|\s+)(feature|minor)(:?\s+)?
|
|
4
|
+
patch-version-bump-message: (^|\s+)(fix|patch)(:?\s+)?
|
|
5
|
+
next-version: 1.0
|
|
6
|
+
assembly-versioning-scheme: MajorMinorPatch
|
|
7
|
+
assembly-file-versioning-scheme: MajorMinorPatch
|
|
8
|
+
assembly-informational-format: '{InformationalVersion}'
|
|
9
|
+
mode: ContinuousDelivery
|
|
10
|
+
increment: Inherit
|
|
11
|
+
continuous-delivery-fallback-tag: ci
|
|
12
|
+
tag-prefix: '[vV]'
|
|
13
|
+
no-bump-message: '\+semver:\s?(none|skip)'
|
|
14
|
+
legacy-semver-padding: 4
|
|
15
|
+
build-metadata-padding: 4
|
|
16
|
+
commits-since-version-source-padding: 4
|
|
17
|
+
tag-pre-release-weight: 60000
|
|
18
|
+
commit-message-incrementing: Enabled
|
|
19
|
+
ignore:
|
|
20
|
+
sha: []
|
|
21
|
+
merge-message-formats: {}
|
|
22
|
+
update-build-number: true
|
|
23
|
+
branches:
|
|
24
|
+
main:
|
|
25
|
+
regex: ^master$|^main$
|
|
26
|
+
mode: ContinuousDelivery
|
|
27
|
+
tag: ''
|
|
28
|
+
increment: Patch
|
|
29
|
+
prevent-increment-of-merged-branch-version: true
|
|
30
|
+
track-merge-target: false
|
|
31
|
+
source-branches: [ 'develop', 'release' ]
|
|
32
|
+
tracks-release-branches: false
|
|
33
|
+
is-release-branch: false
|
|
34
|
+
is-mainline: true
|
|
35
|
+
pre-release-weight: 55000
|
|
36
|
+
develop:
|
|
37
|
+
regex: ^dev(elop)?(ment)?$
|
|
38
|
+
mode: ContinuousDeployment
|
|
39
|
+
tag: alpha
|
|
40
|
+
increment: Minor
|
|
41
|
+
prevent-increment-of-merged-branch-version: false
|
|
42
|
+
track-merge-target: true
|
|
43
|
+
source-branches: []
|
|
44
|
+
tracks-release-branches: true
|
|
45
|
+
is-release-branch: false
|
|
46
|
+
is-mainline: false
|
|
47
|
+
pre-release-weight: 0
|
|
48
|
+
release:
|
|
49
|
+
regex: ^releases?[/-]
|
|
50
|
+
mode: ContinuousDelivery
|
|
51
|
+
tag: beta
|
|
52
|
+
increment: None
|
|
53
|
+
prevent-increment-of-merged-branch-version: true
|
|
54
|
+
track-merge-target: false
|
|
55
|
+
source-branches: [ 'develop', 'main', 'support', 'release' ]
|
|
56
|
+
tracks-release-branches: false
|
|
57
|
+
is-release-branch: true
|
|
58
|
+
is-mainline: false
|
|
59
|
+
pre-release-weight: 30000
|
|
60
|
+
feature:
|
|
61
|
+
regex: ^features?[/-]
|
|
62
|
+
mode: ContinuousDelivery
|
|
63
|
+
tag: useBranchName
|
|
64
|
+
increment: Inherit
|
|
65
|
+
prevent-increment-of-merged-branch-version: false
|
|
66
|
+
track-merge-target: false
|
|
67
|
+
source-branches: [ 'develop', 'main', 'release', 'feature', 'support', 'hotfix' ]
|
|
68
|
+
tracks-release-branches: false
|
|
69
|
+
is-release-branch: false
|
|
70
|
+
is-mainline: false
|
|
71
|
+
pre-release-weight: 30000
|
|
72
|
+
pull-request:
|
|
73
|
+
regex: ^(pull|pull\-requests|pr)[/-]
|
|
74
|
+
mode: ContinuousDelivery
|
|
75
|
+
tag: PullRequest
|
|
76
|
+
increment: Inherit
|
|
77
|
+
prevent-increment-of-merged-branch-version: false
|
|
78
|
+
tag-number-pattern: '[/-](?<number>\d+)[-/]'
|
|
79
|
+
track-merge-target: false
|
|
80
|
+
source-branches: [ 'develop', 'main', 'release', 'feature', 'support', 'hotfix' ]
|
|
81
|
+
tracks-release-branches: false
|
|
82
|
+
is-release-branch: false
|
|
83
|
+
is-mainline: false
|
|
84
|
+
pre-release-weight: 30000
|
|
85
|
+
hotfix:
|
|
86
|
+
regex: ^hotfix(es)?[/-]
|
|
87
|
+
mode: ContinuousDelivery
|
|
88
|
+
tag: beta
|
|
89
|
+
increment: Patch
|
|
90
|
+
prevent-increment-of-merged-branch-version: false
|
|
91
|
+
track-merge-target: false
|
|
92
|
+
source-branches: [ 'develop', 'main', 'support' ]
|
|
93
|
+
tracks-release-branches: false
|
|
94
|
+
is-release-branch: false
|
|
95
|
+
is-mainline: false
|
|
96
|
+
pre-release-weight: 30000
|
|
97
|
+
support:
|
|
98
|
+
regex: ^support[/-]
|
|
99
|
+
mode: ContinuousDelivery
|
|
100
|
+
tag: ''
|
|
101
|
+
increment: Patch
|
|
102
|
+
prevent-increment-of-merged-branch-version: true
|
|
103
|
+
track-merge-target: false
|
|
104
|
+
source-branches: [ 'main' ]
|
|
105
|
+
tracks-release-branches: false
|
|
106
|
+
is-release-branch: false
|
|
107
|
+
is-mainline: true
|
|
108
|
+
pre-release-weight: 55000
|