Skip to content

Commit

Permalink
chore: make fuels ui public (#467)
Browse files Browse the repository at this point in the history
Co-authored-by: Luiz Gomes <8636507+LuizAsFight@users.noreply.github.com>
  • Loading branch information
leocourbassier and LuizAsFight authored Sep 13, 2024
1 parent eb5dc3e commit 4d90c26
Show file tree
Hide file tree
Showing 8 changed files with 507 additions and 6 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)
29 changes: 29 additions & 0 deletions .changeset/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"$schema": "https://unpkg.com/@changesets/config@2.0.0/schema.json",
"changelog": [
"@changesets/changelog-github",
{ "repo": "FuelLabs/fuel-explorer" }
],
"privatePackages": {
"version": true,
"tag": true
},
"commit": false,
"fixed": [["@fuels/ui"]],
"linked": [],
"access": "public",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"ignore": [
"@fuel-explorer/graphql",
"e2e-tests",
"app-portal",
"app-explorer",
"app-commons",
"predicate"
],
"snapshot": {
"useCalculatedVersion": true,
"prereleaseTemplate": "{tag}-{commit}"
}
}
5 changes: 5 additions & 0 deletions .changeset/soft-forks-hope.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@fuels/ui": minor
---

Make the @fuels/ui package public and publishable
61 changes: 61 additions & 0 deletions .github/workflows/release-npm-changeset.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: "Release"

on:
push:
branches:
- main

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

env:
BUILD_VERSION: ""

jobs:
release-changesets:
name: Release master or rc
runs-on: buildjet-4vcpu-ubuntu-2204
steps:
- uses: actions/checkout@v3
with:
# need this to get full git-history/clone in order to build changelogs and check changesets
fetch-depth: 0
# workaround to ensure force pushes to changeset branch use REPO_TOKEN owner's account
# see https://github.com/changesets/action/issues/70
persist-credentials: false
- uses: FuelLabs/github-actions/setups/node@master
with:
node-version: 20.15.1
pnpm-version: 9.5.0

- uses: FuelLabs/github-actions/setups/npm@master
with:
npm-token: ${{ secrets.NPM_TOKEN }}

- name: Bump and Collect Version
run: |
pnpm changeset version
echo "BUILD_VERSION=$(pnpm -s packages:version)" >> $GITHUB_ENV
git reset --hard
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Setup git user (for changelog step)
run: |
git config --global user.name "${{ github.actor }}"
git config --global user.email "${{ github.actor }}@users.noreply.github.com"
- name: Create Release Pull Request or Publish to NPM
id: changesets
uses: FuelLabs/changesets-action@main
with:
publish: pnpm changeset publish --tag next
commit: "ci(changesets): versioning packages"
title: "ci(changesets): versioning packages"
createGithubReleases: aggregate
githubReleaseName: v${{ env.BUILD_VERSION }}
githubTagName: v${{ env.BUILD_VERSION }}
env:
GITHUB_TOKEN: ${{ secrets.REPO_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
17 changes: 15 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@
"scripts": {
"build:preview": "pnpm turbo:run build:preview",
"build:lib": "pnpm turbo:run build:lib",
"changeset": "changeset",
"changeset:empty": "changeset --empty",
"changeset:release": "changeset publish --no-git-tag",
"changeset:version": "changeset version",
"changeset:check": "changeset status --since=main",
"deps:update": "updates -gu && pnpm -r exec updates -gu",
"dev": "./scripts/dev.sh",
"dev:explorer": "pnpm --filter=app-explorer dev",
Expand Down Expand Up @@ -56,6 +61,8 @@
"devDependencies": {
"@babel/core": "^7.23.9",
"@biomejs/biome": "1.5.3",
"@changesets/changelog-github": "0.5.0",
"@changesets/cli": "2.27.8",
"@fuels/jest": "0.20.0",
"@fuels/ts-config": "0.20.0",
"@fuels/tsup-config": "0.20.0",
Expand Down Expand Up @@ -90,8 +97,14 @@
},
"pnpm": {
"peerDependencyRules": {
"allowAny": ["react", "react-dom"],
"ignoreMissing": ["react", "react-dom"]
"allowAny": [
"react",
"react-dom"
],
"ignoreMissing": [
"react",
"react-dom"
]
},
"overrides": {
"glob-parent@<5.1.2": ">=5.1.2",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import type {
GQLQueryTransactionArgs,
GQLQueryTransactionsArgs,
GQLQueryTransactionsByOwnerArgs,
GQLQueryTransactionsByBlockIdArgs,
GQLQueryTransactionsByOwnerArgs,
GQLTransaction,
} from '~/graphql/generated/sdk-provider';
import TransactionDAO from '~/infra/dao/TransactionDAO';
Expand Down
10 changes: 7 additions & 3 deletions packages/ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
"name": "@fuels/ui",
"version": "0.0.1",
"access": "public",
"private": true,
"main": "./src/index.ts",
"exports": {
".": "./src/index.ts",
Expand All @@ -11,10 +10,13 @@
},
"typesVersions": {
"*": {
"tailwind-preset": ["./src/theme/tailwind-preset.ts"]
"tailwind-preset": [
"./src/theme/tailwind-preset.ts"
]
}
},
"publishConfig": {
"access": "public",
"main": "./dist/index.cjs.js",
"module": "./dist/index.cjs.js",
"types": "./dist/index.d.ts",
Expand All @@ -36,7 +38,9 @@
},
"./styles.css": "./dist/styles.css"
},
"files": ["dist"]
"files": [
"dist"
]
},
"scripts": {
"build:lib": "tsup --dts",
Expand Down
Loading

0 comments on commit 4d90c26

Please sign in to comment.