Skip to content

Commit

Permalink
Add changesets for versioning and set up new github workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
GRA0007 committed Oct 13, 2022
1 parent 276b638 commit e70a138
Show file tree
Hide file tree
Showing 9 changed files with 1,820 additions and 38 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)
5 changes: 5 additions & 0 deletions .changeset/brown-spiders-occur.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@stevent-team/epoxy": minor
---

Switched from parcel to esbuild for transpiling routes and package. Also swapped out the argument parser for the cli functionality. Added changesets for versioning.
11 changes: 11 additions & 0 deletions .changeset/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"$schema": "https://unpkg.com/@changesets/config@2.2.0/schema.json",
"changelog": "@changesets/cli/changelog",
"commit": false,
"fixed": [],
"linked": [],
"access": "public",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"ignore": []
}
34 changes: 0 additions & 34 deletions .github/workflows/main.yml

This file was deleted.

30 changes: 30 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Release

on:
push:
branches: ['main']
paths:
- '**/package.json'
- '.changeset/**'
- '.github/workflows/release.yml'

jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-node@v3
with:
node-version: 17
cache: 'yarn'
cache-dependency-path: '**/yarn.lock'
- run: yarn install --immutable && yarn --cwd helpers install --immutable
- uses: changesets/action@v1
with:
publish: yarn ci:release
commit: 'ci: release'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
58 changes: 58 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# @stevent-team/epoxy

## 2.1.0

### Minor Changes

- In-memory caching of routes

### Patch Changes

- Escape HTML special characters from the content of meta tags

## 2.0.1

### Patch Changes

- Fix GitHub actions

## 2.0.0

### Major Changes

- **Breaking:** Separate cli `build` command

## 1.1.3

### Patch Changes

- Use memory cache to compile routes
- Catch errors within route handlers

## 1.1.0

### Minor Changes

- Epoxy can now build routes file with command line command

### Patch Changes

- Fix error reporting

## 1.0.1

### Patch Changes

- Fix path resolution

## 1.0.0

### Major Changes

- Refactor to nodejs and express
- Updated the namespace of the library to `@stevent-team`

### Minor Changes

- Update README with library usage
- Added the `createMeta` helper
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# 🪣 Epoxy

[![npm version](https://img.shields.io/npm/v/@stevent-team/epoxy)](https://www.npmjs.com/package/@stevent-team/epoxy)
[![minzip size](https://img.shields.io/bundlephobia/minzip/@stevent-team/epoxy)](https://bundlephobia.com/package/@stevent-team/epoxy)

Simple server-side per-route html injection

## Purpose
Expand Down Expand Up @@ -164,6 +167,8 @@ Each route must have a function to handle it, which will receive a `request` obj

PRs and Issues are more than welcome :)

This library uses [changesets](https://github.com/changesets/changesets). If the changes you've made would constitute a version bump, run `yarn changeset` and follow the prompts to document the changes you've made. Changesets are consumed on releases, and used to generate a changelog and bump version number.

## License

Created by Stevent (2022) and licensed under MIT
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,11 @@
},
"scripts": {
"build": "tsc -d --emitDeclarationOnly --declarationMap --skipLibCheck --resolveJsonModule --outDir dist && esbuild index.ts --platform=node --target=node16 --format=esm --bundle --sourcemap --external:commander --external:cors --external:esbuild --external:express --external:keyv --external:require-from-string --outfile=dist/index.js",
"build:ci": "yarn build && yarn --cwd helpers build"
"build:ci": "yarn build && yarn --cwd helpers build",
"ci:release": "yarn build:ci && yarn changeset publish"
},
"devDependencies": {
"@changesets/cli": "^2.25.0",
"@types/express": "^4.17.14",
"@types/node": "^18.8.5",
"typescript": "^4.8.4"
Expand Down
Loading

0 comments on commit e70a138

Please sign in to comment.