react-modular-datepicker 0.0.2-canary.19 → 0.0.2-canary.21

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/package.json CHANGED
@@ -1,16 +1,80 @@
1
1
  {
2
2
  "name": "react-modular-datepicker",
3
- "version": "0.0.2-canary.19",
3
+ "version": "0.0.2-canary.21",
4
4
  "description": "Another react datepicker",
5
- "main": "index.js",
6
5
  "keywords": [],
7
6
  "author": "",
8
7
  "license": "MIT",
8
+ "peerDependencies": {
9
+ "dayjs": "^1.11.20",
10
+ "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
11
+ "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0"
12
+ },
13
+ "peerDependenciesMeta": {
14
+ "dayjs": {
15
+ "optional": true
16
+ }
17
+ },
9
18
  "devDependencies": {
19
+ "@playwright/test": "^1.60.0",
20
+ "@tailwindcss/cli": "^4.3.0",
21
+ "@types/react": "^19.2.15",
22
+ "@types/react-dom": "^19.2.3",
23
+ "bunchee": "^6.10.0",
24
+ "dayjs": "^1.11.20",
25
+ "react": "^19.2.6",
26
+ "react-dom": "^19.2.6",
10
27
  "semver": "^7.8.1",
28
+ "tailwindcss": "^4.3.0",
11
29
  "typescript": "^6.0.3"
12
30
  },
31
+ "files": [
32
+ "dist"
33
+ ],
34
+ "main": "./dist/cjs/index.js",
35
+ "module": "./dist/es/index.mjs",
36
+ "types": "./dist/cjs/index.d.ts",
37
+ "exports": {
38
+ ".": {
39
+ "import": {
40
+ "types": "./dist/es/index.d.mts",
41
+ "default": "./dist/es/index.mjs"
42
+ },
43
+ "require": {
44
+ "types": "./dist/cjs/index.d.ts",
45
+ "default": "./dist/cjs/index.js"
46
+ }
47
+ },
48
+ "./useDates": {
49
+ "import": {
50
+ "types": "./dist/es/useDates.d.mts",
51
+ "default": "./dist/es/useDates.mjs"
52
+ },
53
+ "require": {
54
+ "types": "./dist/cjs/useDates.d.ts",
55
+ "default": "./dist/cjs/useDates.js"
56
+ }
57
+ },
58
+ "./utils": {
59
+ "import": {
60
+ "types": "./dist/es/utils.d.mts",
61
+ "default": "./dist/es/utils.mjs"
62
+ },
63
+ "require": {
64
+ "types": "./dist/cjs/utils.d.ts",
65
+ "default": "./dist/cjs/utils.js"
66
+ }
67
+ },
68
+ "./dist/index.css": "./dist/index.css"
69
+ },
13
70
  "scripts": {
14
- "test": "echo \"Error: no test specified\" && exit 1"
71
+ "dev": "pnpm run -p \"/^dev:.*/\"",
72
+ "dev:watch": "bunchee -w",
73
+ "dev:css": "tailwindcss -i src/index.css -o dist/index.css --watch",
74
+ "dev:example": "pnpm --filter example-app-router dev",
75
+ "build": "pnpm run build:js && pnpm run build:css",
76
+ "build:js": "bunchee -m",
77
+ "build:css": "tailwindcss -i src/index.css -o dist/index.css",
78
+ "test:e2e": "playwright test"
15
79
  }
16
80
  }
package/.gitattributes DELETED
@@ -1,2 +0,0 @@
1
- # Auto detect text files and perform LF normalization
2
- * text=auto
@@ -1,60 +0,0 @@
1
- on:
2
- workflow_dispatch:
3
- inputs:
4
- releaseType:
5
- description: Release stable or canary?
6
- required: true
7
- type: choice
8
- options:
9
- - canary
10
- - stable
11
- semverType:
12
- description: semver type?
13
- type: choice
14
- options:
15
- - patch
16
- - minor
17
- - major
18
-
19
- permissions:
20
- contents: write
21
- id-token: write
22
-
23
- name: Release
24
-
25
- env:
26
- SEMVER_TYPE: ${{ github.event.inputs.semverType }}
27
- RELEASE_TYPE: ${{ github.event.inputs.releaseType }}
28
-
29
- jobs:
30
- release:
31
- runs-on: ubuntu-latest
32
- steps:
33
- - uses: actions/checkout@v6
34
- - uses: pnpm/action-setup@v6
35
- with:
36
- version: 11
37
- - uses: actions/setup-node@v6
38
- with:
39
- node-version: 22
40
- cache: 'pnpm'
41
- registry-url: 'https://registry.npmjs.org'
42
- - name: Install dependencies
43
- run: pnpm i --frozen-lockfile
44
- - name: Configure git
45
- run: |
46
- git config user.name "dragate"
47
- git config user.email "spidfair@gmail.com"
48
- - name: Bump version and tag
49
- id: bump
50
- run: node ./scripts/bump-version.js
51
- - name: Push version commit
52
- run: |
53
- git push origin ${GITHUB_REF#refs/heads/}
54
- git push origin --tags
55
- - name: Create release
56
- run: gh release create v${{ steps.bump.outputs.version }} --target ${GITHUB_REF#refs/heads/} --generate-notes ${{ github.event.inputs.releaseType == 'canary' && '--prerelease' || '' }}
57
- env:
58
- GH_TOKEN: ${{ github.token }}
59
- - name: Publish package
60
- run: pnpm publish --no-git-checks --access public --tag ${{ github.event.inputs.releaseType }}
package/index.js DELETED
@@ -1,5 +0,0 @@
1
- function test() {
2
- return "Init publish"
3
- }
4
-
5
- module.exports = test
@@ -1,41 +0,0 @@
1
- const fs = require('fs')
2
- const path = require('path')
3
- const { execSync } = require('child_process')
4
- const semver = require('semver')
5
-
6
- const packageJsonPath = path.join(__dirname, '../package.json')
7
- const packageJsonData = fs.readFileSync(packageJsonPath, 'utf8')
8
- const packageJson = JSON.parse(packageJsonData)
9
-
10
- let version = packageJson.version
11
-
12
- switch (process.env.RELEASE_TYPE) {
13
- case "canary":
14
- version = semver.prerelease(version)
15
- ? semver.inc(version, 'prerelease')
16
- : semver.inc(version, `pre${process.env.SEMVER_TYPE}`, 'canary')
17
- break
18
- case "stable":
19
- if (!process.env.SEMVER_TYPE) {
20
- console.error('Missing semver type. Expected "patch", "minor" or "major".')
21
- process.exit(1)
22
- }
23
- version = semver.inc(version, process.env.SEMVER_TYPE)
24
- break
25
- default:
26
- console.error('Invalid release type. Expected "canary" or "stable".')
27
- process.exit(1)
28
- }
29
-
30
- fs.appendFileSync(process.env.GITHUB_OUTPUT, `version=${version}\n`)
31
-
32
- if (process.env.DRY_RUN) {
33
- console.log(`pnpm version ${version}`)
34
- } else {
35
- try {
36
- execSync(`pnpm version ${version}`, { stdio: 'inherit' })
37
- } catch (error) {
38
- console.error('Failed to execute version:', error)
39
- process.exit(1)
40
- }
41
- }