react-modular-datepicker 0.0.2-canary.4 → 0.0.2

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,83 @@
1
1
  {
2
2
  "name": "react-modular-datepicker",
3
- "version": "0.0.2-canary.4",
3
+ "version": "0.0.2",
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": {
10
- "semver": "^7.6.0",
11
- "typescript": "^5.4.4"
19
+ "@playwright/test": "^1.60.0",
20
+ "@tailwindcss/cli": "^4.3.0",
21
+ "@tailwindcss/vite": "^4.3.3",
22
+ "@types/react": "^19.2.15",
23
+ "@types/react-dom": "^19.2.3",
24
+ "@vitejs/plugin-react": "^6.1.1",
25
+ "dayjs": "^1.11.20",
26
+ "react": "^19.2.6",
27
+ "react-dom": "^19.2.6",
28
+ "semver": "^7.8.1",
29
+ "tailwindcss": "^4.3.0",
30
+ "typescript": "^6.0.3",
31
+ "vite": "^8.3.0",
32
+ "vite-plugin-dts": "^5.1.0"
33
+ },
34
+ "files": [
35
+ "dist"
36
+ ],
37
+ "main": "./dist/index.js",
38
+ "module": "./dist/index.mjs",
39
+ "types": "./dist/index.d.ts",
40
+ "exports": {
41
+ ".": {
42
+ "import": {
43
+ "types": "./dist/index.d.ts",
44
+ "default": "./dist/index.mjs"
45
+ },
46
+ "require": {
47
+ "types": "./dist/index.d.ts",
48
+ "default": "./dist/index.js"
49
+ }
50
+ },
51
+ "./useDates": {
52
+ "import": {
53
+ "types": "./dist/useDates.d.ts",
54
+ "default": "./dist/useDates.mjs"
55
+ },
56
+ "require": {
57
+ "types": "./dist/useDates.d.ts",
58
+ "default": "./dist/useDates.js"
59
+ }
60
+ },
61
+ "./utils": {
62
+ "import": {
63
+ "types": "./dist/utils.d.ts",
64
+ "default": "./dist/utils.mjs"
65
+ },
66
+ "require": {
67
+ "types": "./dist/utils.d.ts",
68
+ "default": "./dist/utils.js"
69
+ }
70
+ },
71
+ "./dist/index.css": "./dist/index.css"
12
72
  },
13
73
  "scripts": {
14
- "test": "echo \"Error: no test specified\" && exit 1"
74
+ "dev": "pnpm run -p \"/^dev:.*/\"",
75
+ "dev:watch": "vite build --watch",
76
+ "dev:css": "tailwindcss -i src/index.css -o dist/index.css --watch",
77
+ "dev:example": "pnpm --filter example-app-router dev",
78
+ "build": "pnpm run build:js && pnpm run build:css",
79
+ "build:js": "vite build",
80
+ "build:css": "tailwindcss -i src/index.css -o dist/index.css",
81
+ "test:e2e": "playwright test"
15
82
  }
16
83
  }
package/.gitattributes DELETED
@@ -1,2 +0,0 @@
1
- # Auto detect text files and perform LF normalization
2
- * text=auto
@@ -1,59 +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
- name: Release
20
-
21
- env:
22
- SEMVER_TYPE: ${{ github.event.inputs.semverType }}
23
- RELEASE_TYPE: ${{ github.event.inputs.releaseType }}
24
-
25
- jobs:
26
- release:
27
- runs-on: ubuntu-latest
28
- steps:
29
- - uses: actions/checkout@v4
30
- - uses: pnpm/action-setup@v3
31
- with:
32
- version: 8
33
- - uses: actions/setup-node@v4
34
- with:
35
- node-version: 18
36
- cache: 'pnpm'
37
- - name: Install dependencies
38
- run: pnpm i --frozen-lockfile
39
- - name: Configure git
40
- run: |
41
- git config user.name "dragate"
42
- git config user.email "spidfair@gmail.com"
43
- - name: Bump version and tag
44
- id: bump
45
- run: node ./scripts/bump-version.js
46
- - name: Push version commit
47
- run: |
48
- git push origin ${GITHUB_REF#refs/heads/}
49
- git push origin --tags
50
- - name: Create release
51
- run: gh release create v${{ steps.bump.outputs.version }} --target ${GITHUB_REF#refs/heads/} --generate-notes ${{ github.event.inputs.releaseType == 'canary' && '--prerelease' || '' }}
52
- env:
53
- GH_TOKEN: ${{ github.token }}
54
- - name: Set publishing config
55
- run: pnpm config set '//registry.npmjs.org/:_authToken' "${NPM_TOKEN}"
56
- env:
57
- NPM_TOKEN: ${{ secrets.NPM_ACCESS_TOKEN }}
58
- - name: Publish package
59
- run: pnpm publish --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
- console.log(`::set-output name=version::${version}`);
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
- }