Skip to content

Commit 4df1347

Browse files
authored
Migrate to yarn monorepo (withastro#157)
* chore: use monorepo * chore: scaffold astro-scripts * chore: move tests inside packages/astro * chore: refactor tests, add scripts * chore: move parser to own module * chore: move runtime to packages/astro * fix: move parser to own package * test: fix prettier-plugin-astro tests * fix: tests * chore: update package-lock * chore: add changesets * fix: cleanup examples * fix: starter example * chore: update changeset config * chore: update changeset config * chore: setup changeset release workflow * chore: bump lockfiles * chore: prism => astro-prism * fix: tsc --emitDeclarationOnly * chore: final cleanup, switch to yarn * chore: add lerna * chore: update workflows to yarn * chore: update workflows * chore: remove lint workflow * chore: add astro-dev script * chore: add symlinked README
1 parent 1d498fa commit 4df1347

File tree

269 files changed

+12780
-37696
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

269 files changed

+12780
-37696
lines changed

.changeset/README.md

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Changesets
2+
3+
Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
4+
with multi-package repos, or single-package repos to help you version and publish your code. You can
5+
find the full documentation for it [in our repository](https://github.com/changesets/changesets)
6+
7+
We have a quick list of common questions to get you started engaging with this project in
8+
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)

.changeset/config.json

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json",
3+
"changelog": "@changesets/cli/changelog",
4+
"commit": false,
5+
"linked": [["astro", "astro-parser"]],
6+
"access": "public",
7+
"baseBranch": "main",
8+
"updateInternalDependencies": "patch",
9+
"ignore": [
10+
"@example/*",
11+
"www"
12+
]
13+
}

.eslintignore

+5-3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1-
src/parser/parse/**/*.ts
2-
vscode/**/*.ts
3-
create-astro/**/*.js
1+
**/*.js
2+
**/*.ts
3+
!packages/astro/**/*.js
4+
!packages/astro/**/*.ts
5+
packages/astro/test/**/*.js

.github/workflows/changelog.yml

+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Changelog
2+
3+
on:
4+
push:
5+
paths-ignore:
6+
- '.vscode/**'
7+
- 'assets/**'
8+
- 'docs/**'
9+
- 'examples/**'
10+
- 'www/**'
11+
branches:
12+
- main
13+
14+
15+
jobs:
16+
release:
17+
name: Changelog
18+
runs-on: ubuntu-latest
19+
steps:
20+
- name: Checkout Repo
21+
uses: actions/checkout@master
22+
with:
23+
# This makes Actions fetch all Git history so that Changesets can generate changelogs with the correct commits
24+
fetch-depth: 0
25+
26+
- name: Setup Node.js 14.x
27+
uses: actions/setup-node@master
28+
with:
29+
node-version: 14.x
30+
31+
- name: Install Dependencies
32+
run: yarn --frozen-lockfile
33+
env:
34+
CI: true
35+
36+
- name: Create Release Pull Request
37+
uses: changesets/action@master
38+
env:
39+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/changeset.yml

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Changeset
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
8+
jobs:
9+
release:
10+
name: Ensure changeset
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout Repo
14+
uses: actions/checkout@master
15+
16+
- name: Setup Node.js 14.x
17+
uses: actions/setup-node@master
18+
with:
19+
node-version: 14.x
20+
21+
- name: Install Dependencies
22+
run: yarn --frozen-lockfile
23+
env:
24+
CI: true
25+
26+
- run: changeset status --sinceMaster

.github/workflows/format.yml

+5-3
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,13 @@ jobs:
1818
- uses: actions/setup-node@v1
1919
with:
2020
node-version: ${{ env.node_version }}
21-
- run: npm ci
22-
- run: npm run format
21+
- run: yarn --frozen-lockfile
22+
env:
23+
CI: true
24+
- run: yarn format
2325
- name: Commit changes
2426
uses: stefanzweifel/git-auto-commit-action@v4
2527
with:
26-
commit_message: '[ci] npm run format'
28+
commit_message: '[ci] yarn format'
2729
branch: ${{ github.head_ref }}
2830
push_options: --force

.github/workflows/nodejs.yml

+7-24
Original file line numberDiff line numberDiff line change
@@ -36,29 +36,12 @@ jobs:
3636
uses: actions/setup-node@v1
3737
with:
3838
node-version: ${{ matrix.node-version }}
39-
- name: npm install, build, and test
40-
run: |
41-
cd examples/snowpack
42-
npm ci
43-
cd ../..
44-
45-
npm ci
46-
npm run build
47-
48-
cd prettier-plugin-astro
49-
npm ci
50-
51-
cd ../examples/kitchen-sink
52-
npm ci
53-
npm run build
54-
cd ../..
55-
npm test
39+
- run: yarn --frozen-lockfile
40+
env:
41+
CI: true
42+
- run: yarn build
43+
env:
44+
CI: true
45+
- run: yarn test
5646
env:
5747
CI: true
58-
lint:
59-
runs-on: ubuntu-latest
60-
steps:
61-
- uses: actions/checkout@v1
62-
- uses: actions/setup-node@v1
63-
- run: npm ci
64-
- run: npm run lint

.gitignore

-5
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,6 @@
11
node_modules/
2-
lib/
3-
parser/
42
dist/
53
*.tsbuildinfo
64
.DS_Store
7-
._.DS_Store
8-
test/fixtures/*/dist/
9-
www/dist
105
.vercel
116
_site/

README.md

-194
This file was deleted.

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
./README.md

0 commit comments

Comments
 (0)