Skip to content

Commit

Permalink
chore: switch to changesets and npm workspaces
Browse files Browse the repository at this point in the history
  • Loading branch information
DylanPiercey committed Apr 27, 2022
1 parent 123b9a8 commit 6af6bf5
Show file tree
Hide file tree
Showing 15 changed files with 17,985 additions and 26,819 deletions.
8 changes: 8 additions & 0 deletions .changeset/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Changesets

Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
with multi-package repos, or single-package repos to help you version and publish your code. You can
find the full documentation for it [in our repository](https://github.com/changesets/changesets)

We have a quick list of common questions to get you started engaging with this project in
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)
16 changes: 16 additions & 0 deletions .changeset/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"$schema": "https://unpkg.com/@changesets/config@1.7.0/schema.json",
"changelog": [
"@changesets/changelog-github",
{
"repo": "marko-js/marko"
}
],
"updateInternalDependencies": "patch",
"baseBranch": "main",
"access": "public",
"commit": false,
"linked": [],
"ignore": [],
"fixed": []
}
9 changes: 9 additions & 0 deletions .changeset/forty-dolphins-shake.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
"@marko/babel-utils": minor
"@marko/compiler": minor
"marko": minor
"@marko/translator-default": minor
---

Upgrades the compiler to use the latest major release of `htmljs-parser` bringing in the improvements listed here:
https://github.com/marko-js/htmljs-parser/pull/93
6 changes: 0 additions & 6 deletions .commitlintrc.json

This file was deleted.

76 changes: 66 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,29 +2,85 @@ name: CI

on:
pull_request:
paths-ignore: ["*.md"]
types: [opened, synchronize]
paths-ignore: ["**.md"]
push:
branches: ["main"]
paths-ignore: ["*.md"]
branches: [main, v3, v4]
paths-ignore: ["**.md"]

jobs:
build:
format:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
ref: ${{ github.head_ref }}
- name: Use node
uses: actions/setup-node@v3
with:
node-version: 16
cache: npm
- name: Install dependencies
run: npm ci
- name: Format Code
run: npm run format
- name: Commit changes
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: "[ci] format"
commit_user_name: "github-actions[bot]"
commit_user_email: "github-actions[bot]@users.noreply.github.com"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
test:
runs-on: ubuntu-latest
name: "test: node@${{ matrix.node }}"
strategy:
fail-fast: false
matrix:
node: [12.x, 14.x, 15.x]
node: [14, 16, 18]
steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Use node@${{ matrix.node }}
uses: actions/setup-node@v2
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
cache: npm
- name: Install dependencies
if: ${{ matrix.node == 14 }}
run: npx npm@8 ci
- name: Install dependencies
if: ${{ matrix.node != 14 }}
run: npm ci
- name: Lint code
run: npm run lint
- name: Run tests
run: npm run ci:test
- name: Report code coverage
run: npm run ci:report
uses: codecov/codecov-action@v2
release:
runs-on: ubuntu-latest
needs: [format, test]
if: ${{ github.repository == 'marko-js/marko' && github.event_name == 'push' }}
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: 16.x
cache: npm
- name: Install dependencies
run: npm ci
- name: Release
id: changesets
uses: changesets/action@v1
with:
createGithubReleases: true
version: npm run version
publish: npm run publish
commit: "[ci] release"
title: "[ci] release"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
1 change: 0 additions & 1 deletion .huskyrc
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"hooks": {
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS",
"pre-commit": "lint-staged"
}
}
5 changes: 5 additions & 0 deletions .mocharc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"enable-source-maps": true,
"watchFiles": ["src/**/*.js", "src/**/*.marko"],
"require": ["@babel/register"]
}
2 changes: 0 additions & 2 deletions .npmrc

This file was deleted.

6 changes: 0 additions & 6 deletions commitlint.config.js

This file was deleted.

17 changes: 0 additions & 17 deletions lerna.json

This file was deleted.

Loading

0 comments on commit 6af6bf5

Please sign in to comment.