8000 Merge branch 'main' into feat/new-api · netlify/blobs@b40e5af · GitHub
[go: up one dir, main page]

Skip to content

Commit b40e5af

Browse files
committed
Merge branch 'main' into feat/new-api
2 parents 9cbbab8 + e733b33 commit b40e5af

File tree

7 files changed

+1508
-133
lines changed

7 files changed

+1508
-133
lines changed

.eslintignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
dist

.github/workflows/pre-release.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: prerelease
2+
on:
3+
push:
4+
branches:
5+
# releases/<tag>/<version>
6+
# releases/rc.1/2.0.0 - will result in 2.0.0-rc.0
7+
- releases/*/*
8+
jobs:
9+
prerelease:
10+
runs-on: ubuntu-latest
11+
permissions:
12+
id-token: write
13+
contents: write
14+
steps:
15+
- uses: actions/checkout@v3
16+
- uses: actions/setup-node@v3
17+
with:
18+
node-version: lts/*
19+
cache: npm
20+
registry-url: 'https://registry.npmjs.org'
21+
- name: Install core dependencies
22+
run: npm ci --no-audit
23+
- name: Extract tag and version
24+
id: extract
25+
run: |-
26+
ref=${{ github.ref }}
27+
branch=${ref:11}
28+
tag_version=${branch:9}
29+
tag=${tag_version%/*}
30+
version=${tag_version##*/}
31+
echo "tag=${tag}" >> $GITHUB_OUTPUT
32+
echo "version=${version}" >> $GITHUB_OUTPUT
33+
- name: Log versions
34+
run: |-
35+
echo tag=${{ steps.extract.outputs.tag }}
36+
echo version=${{ steps.extract.outputs.version }}
37+
- name: Setup git user
38+
run: git config --global user.name github-actions
39+
- name: Setup git email
40+
run: git config --global user.email github-actions@github.com
41+
- name: Run npm version
42+
run: npm version ${{ steps.extract.outputs.version }}-${{ steps.extract.outputs.tag }} --allow-same-version
43+
- name: Push changes
44+
run: git push --follow-tags
45+
- name: Run npm publish
46+
run: npm publish --tag=${{ steps.extract.outputs.tag }}
47+
env:
48+
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# Changelog
22

3+
## [2.1.0](https://github.com/netlify/blobs/compare/v2.0.0...v2.1.0) (2023-10-11)
4+
5+
6+
### Features
7+
8+
* export commonjs and esm from package ([#59](https://github.com/netlify/blobs/issues/59)) ([38b9c81](https://github.com/netlify/blobs/commit/38b9c81c280a2bc3b7a348103d94b98fd44f67e9))
9+
310
## [2.0.0](https://github.com/netlify/blobs/compare/v1.6.1...v2.0.0) (2023-09-25)
411

512

build.mjs

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
#!/usr/bin/env node
2+
import { rm } from 'node:fs/promises'
3+
import { argv } from 'process'
4+
5+
// eslint-disable-next-line import/no-extraneous-dependencies
6+
import { build } from 'tsup'
7+
8+
const dist = './dist'
9+
10+
await rm(dist, { recursive: true, force: true })
11+
12+
/** @type {import('tsup').Options} */
13+
const options = {
14+
entry: ['src/main.ts'],
15+
tsconfig: 'tsconfig.json',
16+
bundle: true,
17+
dts: true,
18+
outDir: dist,
19+
watch: argv.includes('--watch'),
20+
}
21+
22+
await Promise.all(['esm', 'cjs'].map((format) => build({ ...options, format })))

0 commit comments

Comments
 (0)
0