create-croissant 0.1.46 → 0.1.47
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,15 +0,0 @@
|
|
|
1
|
-
version: 2
|
|
2
|
-
updates:
|
|
3
|
-
- package-ecosystem: "pnpm"
|
|
4
|
-
directory: "/"
|
|
5
|
-
schedule:
|
|
6
|
-
interval: "weekly"
|
|
7
|
-
open-pull-requests-limit: 10
|
|
8
|
-
groups:
|
|
9
|
-
dependencies:
|
|
10
|
-
patterns:
|
|
11
|
-
- "*"
|
|
12
|
-
- package-ecosystem: "github-actions"
|
|
13
|
-
directory: "/"
|
|
14
|
-
schedule:
|
|
15
|
-
interval: "monthly"
|
|
@@ -1,143 +0,0 @@
|
|
|
1
|
-
name: CI
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
push:
|
|
5
|
-
branches: ["main"]
|
|
6
|
-
pull_request:
|
|
7
|
-
branches: ["main"]
|
|
8
|
-
|
|
9
|
-
permissions:
|
|
10
|
-
contents: write
|
|
11
|
-
id-token: write
|
|
12
|
-
|
|
13
|
-
jobs:
|
|
14
|
-
build:
|
|
15
|
-
name: Build and Test
|
|
16
|
-
runs-on: ubuntu-latest
|
|
17
|
-
steps:
|
|
18
|
-
- name: Checkout Repo
|
|
19
|
-
uses: actions/checkout@v4
|
|
20
|
-
with:
|
|
21
|
-
fetch-depth: 0
|
|
22
|
-
|
|
23
|
-
- name: Setup Node.js
|
|
24
|
-
uses: actions/setup-node@v4
|
|
25
|
-
with:
|
|
26
|
-
node-version: 24
|
|
27
|
-
|
|
28
|
-
- name: Setup pnpm
|
|
29
|
-
uses: pnpm/action-setup@v4
|
|
30
|
-
with:
|
|
31
|
-
version: 9.15.0
|
|
32
|
-
run_install: false
|
|
33
|
-
|
|
34
|
-
- name: Get pnpm store directory
|
|
35
|
-
shell: bash
|
|
36
|
-
run: |
|
|
37
|
-
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
|
|
38
|
-
|
|
39
|
-
- name: Setup pnpm cache
|
|
40
|
-
uses: actions/cache@v4
|
|
41
|
-
with:
|
|
42
|
-
path: ${{ env.STORE_PATH }}
|
|
43
|
-
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
|
|
44
|
-
restore-keys: |
|
|
45
|
-
${{ runner.os }}-pnpm-store-
|
|
46
|
-
|
|
47
|
-
- name: Install Dependencies
|
|
48
|
-
run: pnpm install
|
|
49
|
-
|
|
50
|
-
- name: Lint
|
|
51
|
-
run: pnpm run lint
|
|
52
|
-
|
|
53
|
-
- name: Typecheck
|
|
54
|
-
run: pnpm run typecheck
|
|
55
|
-
|
|
56
|
-
- name: Build
|
|
57
|
-
run: pnpm run build
|
|
58
|
-
|
|
59
|
-
release:
|
|
60
|
-
name: Release create-croissant
|
|
61
|
-
needs: build
|
|
62
|
-
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
|
|
63
|
-
runs-on: ubuntu-latest
|
|
64
|
-
steps:
|
|
65
|
-
- name: Checkout Repo
|
|
66
|
-
uses: actions/checkout@v4
|
|
67
|
-
with:
|
|
68
|
-
fetch-depth: 0
|
|
69
|
-
|
|
70
|
-
- name: Setup Node.js
|
|
71
|
-
uses: actions/setup-node@v4
|
|
72
|
-
with:
|
|
73
|
-
node-version: 24
|
|
74
|
-
registry-url: "https://registry.npmjs.org"
|
|
75
|
-
|
|
76
|
-
- name: Setup pnpm
|
|
77
|
-
uses: pnpm/action-setup@v4
|
|
78
|
-
with:
|
|
79
|
-
version: 9.15.0
|
|
80
|
-
run_install: false
|
|
81
|
-
|
|
82
|
-
- name: Install Dependencies
|
|
83
|
-
run: pnpm install
|
|
84
|
-
|
|
85
|
-
- name: Bump Version and Publish
|
|
86
|
-
run: |
|
|
87
|
-
# Configure git
|
|
88
|
-
git config --global user.name "github-actions[bot]"
|
|
89
|
-
git config --global user.email "github-actions[bot]@users.noreply.github.com"
|
|
90
|
-
|
|
91
|
-
# Prepare the template from the latest monorepo state
|
|
92
|
-
pnpm --filter create-croissant run prepare-template
|
|
93
|
-
|
|
94
|
-
# Move into the package directory for versioning and publishing
|
|
95
|
-
cd packages/create-croissant
|
|
96
|
-
|
|
97
|
-
# Get the latest version from npm to avoid conflicts
|
|
98
|
-
NPM_VERSION=$(pnpm view create-croissant version 2>/dev/null || echo "0.0.0")
|
|
99
|
-
LOCAL_VERSION=$(node -p "require('./package.json').version")
|
|
100
|
-
|
|
101
|
-
echo "NPM version: $NPM_VERSION"
|
|
102
|
-
echo "Local version: $LOCAL_VERSION"
|
|
103
|
-
|
|
104
|
-
# If npm has a higher version, sync local version first
|
|
105
|
-
if [ "$NPM_VERSION" != "$LOCAL_VERSION" ] && [ "$(printf '%s\n' "$NPM_VERSION" "$LOCAL_VERSION" | sort -V | tail -n1)" = "$NPM_VERSION" ] && [ "$NPM_VERSION" != "0.0.0" ]; then
|
|
106
|
-
echo "Syncing local version to $NPM_VERSION to avoid conflict"
|
|
107
|
-
npm version $NPM_VERSION --no-git-tag-version
|
|
108
|
-
fi
|
|
109
|
-
|
|
110
|
-
# Bump version (patch)
|
|
111
|
-
npm version patch --no-git-tag-version
|
|
112
|
-
|
|
113
|
-
NEW_VERSION=$(node -p "require('./package.json').version")
|
|
114
|
-
echo "New version to be published: $NEW_VERSION"
|
|
115
|
-
|
|
116
|
-
# Build the package
|
|
117
|
-
pnpm run build
|
|
118
|
-
|
|
119
|
-
# Publish to npm (using Trusted Publishing)
|
|
120
|
-
pnpm publish --provenance --access public --no-git-checks
|
|
121
|
-
|
|
122
|
-
# Go back to root for git operations
|
|
123
|
-
cd ../..
|
|
124
|
-
|
|
125
|
-
# After successful publish, commit the version change and tag it
|
|
126
|
-
git add packages/create-croissant/package.json
|
|
127
|
-
git commit -m "chore: release create-croissant v$NEW_VERSION [skip ci]"
|
|
128
|
-
git tag "v$NEW_VERSION"
|
|
129
|
-
|
|
130
|
-
# Push the version bump commit and tag back to main
|
|
131
|
-
git push origin main --follow-tags
|
|
132
|
-
|
|
133
|
-
# Create a GitHub Release
|
|
134
|
-
# --generate-notes automatically creates a changelog based on commits
|
|
135
|
-
# We use --target main to ensure the release is associated with the pushed branch
|
|
136
|
-
gh release create "v$NEW_VERSION" \
|
|
137
|
-
--target main \
|
|
138
|
-
--title "Release v$NEW_VERSION (create-croissant)" \
|
|
139
|
-
--generate-notes \
|
|
140
|
-
--latest
|
|
141
|
-
env:
|
|
142
|
-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
143
|
-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
name: Dependabot Auto-Merge
|
|
2
|
-
on: pull_request
|
|
3
|
-
|
|
4
|
-
permissions:
|
|
5
|
-
contents: write
|
|
6
|
-
pull-requests: write
|
|
7
|
-
|
|
8
|
-
jobs:
|
|
9
|
-
dependabot:
|
|
10
|
-
runs-on: ubuntu-latest
|
|
11
|
-
if: github.actor == 'dependabot[bot]'
|
|
12
|
-
steps:
|
|
13
|
-
- name: Dependabot metadata
|
|
14
|
-
id: metadata
|
|
15
|
-
uses: dependabot/fetch-metadata@v3
|
|
16
|
-
with:
|
|
17
|
-
github-token: "${{ secrets.GITHUB_TOKEN }}"
|
|
18
|
-
- name: Enable auto-merge for Dependabot PRs
|
|
19
|
-
if: steps.metadata.outputs.update-type != 'version-update:semver-major'
|
|
20
|
-
run: gh pr merge --auto --squash "$PR_URL"
|
|
21
|
-
env:
|
|
22
|
-
PR_URL: ${{github.event.pull_request.html_url}}
|
|
23
|
-
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
|
package/template/.husky/pre-push
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
#!/bin/sh
|
|
2
|
-
. "$(dirname "$0")/_/husky.sh"
|
|
3
|
-
|
|
4
|
-
# Get the name of the branch being pushed
|
|
5
|
-
branch=$(git rev-parse --abbrev-ref HEAD)
|
|
6
|
-
|
|
7
|
-
# Only run if pushing to main
|
|
8
|
-
if [ "$branch" = "main" ]; then
|
|
9
|
-
echo "Pushing to main branch, running CI checks..."
|
|
10
|
-
npm run ci
|
|
11
|
-
fi
|