Skip to content
This repository has been archived by the owner on Jul 16, 2024. It is now read-only.

Commit

Permalink
refactor build setup to use pnpm
Browse files Browse the repository at this point in the history
  • Loading branch information
IMax153 authored and mikearnaldi committed Oct 20, 2022
1 parent 590ee83 commit 76ba0ae
Show file tree
Hide file tree
Showing 88 changed files with 6,435 additions and 9,721 deletions.
6 changes: 6 additions & 0 deletions .changeset/yellow-needles-cheat.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@effect/printer": minor
"@effect/printer-ansi": minor
---

remove tsplus/stdlib in favor of fp-ts/data
3 changes: 1 addition & 2 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ module.exports = {
"plugin:@typescript-eslint/recommended",
"plugin:@repo-tooling/dprint/recommended"
],
plugins: ["import", "sort-destructure-keys", "simple-import-sort", "codegen"],
plugins: ["import", "sort-destructure-keys", "simple-import-sort"],
rules: {
"@repo-tooling/dprint/dprint": [
"error",
Expand All @@ -42,7 +42,6 @@ module.exports = {
"no-restricted-imports": ["error", {
"patterns": [".*"]
}],
"codegen/codegen": "error",
"no-fallthrough": "off",
"no-irregular-whitespace": "off",
"object-shorthand": "error",
Expand Down
3 changes: 2 additions & 1 deletion .github/changeset-version.cjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
const { execSync } = require("node:child_process");

execSync("npm install -g pnpm");
execSync("npx changeset version");
execSync("YARN_ENABLE_IMMUTABLE_INSTALLS=false node .yarn/releases/yarn-3.2.1.cjs");
execSync("pnpm install --lockfile-only");
40 changes: 0 additions & 40 deletions .github/workflows/branch.yml

This file was deleted.

60 changes: 33 additions & 27 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,49 +1,55 @@
name: Main CI
name: Main Flow

on:
push:
branches:
- main
branches: [main]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [16.17.1]

steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Use Node.js 16.x
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: 16.x
cache: yarn
- name: Install
run: |
npm install -g yarn
yarn
env:
CI: "true"
- name: Build
run: |
yarn build
env:
CI: "true"
- name: Check Circular Dependencies
run: |
yarn circular
env:
CI: "true"
- name: Test
node-version: ${{ matrix.node-version }}
- uses: pnpm/action-setup@v2.0.1
name: Install pnpm
id: pnpm-install
with:
version: 7
run_install: false
- name: Get pnpm store directory
id: pnpm-cache
run: |
yarn test --run
env:
CI: "true"
echo "::set-output name=pnpm_cache_dir::$(pnpm store path)"
- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- run: pnpm install
- run: pnpm build
- run: pnpm test
- name: Create Version PR or Publish to NPM
if: github.repository == 'fp-ts/core'
id: changesets
uses: changesets/action@v1
with:
version: node .github/changeset-version.cjs
publish: yarn release
publish: pnpm release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.EFFECT_BOT_NPM }}
46 changes: 46 additions & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: PR Flow

on:
pull_request:
branches:
- 'main'

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [16.17.1]

steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- uses: pnpm/action-setup@v2.0.1
name: Install pnpm
id: pnpm-install
with:
version: 7
run_install: false
- name: Get pnpm store directory
id: pnpm-cache
run: |
echo "::set-output name=pnpm_cache_dir::$(pnpm store path)"
- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- run: pnpm install
- run: pnpm build
- run: pnpm test
7 changes: 0 additions & 7 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,13 +1,6 @@
/.yarn/*
!/.yarn/releases
!/.yarn/plugins
!/.yarn/sdks
!/.yarn/patches

coverage/
*.tsbuildinfo
node_modules/
yarn-error.log
.ultra.cache.json
.DS_Store
tmp/
Expand Down
2 changes: 1 addition & 1 deletion .gitpod.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
tasks:
- init: yarn && yarn build
- init: pnpm install && pnpm build
github:
prebuilds:
addCheck: true
Expand Down
31 changes: 4 additions & 27 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
"typescript.enablePromptUseWorkspaceTsdk": true,
"editor.formatOnSave": true,
"eslint.format.enable": true,
"explorer.sortOrder": "mixed",
"[json]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[javascript]": {
"editor.defaultFormatter": "dbaeumer.vscode-eslint"
},
Expand All @@ -17,32 +19,7 @@
"[typescriptreact]": {
"editor.defaultFormatter": "dbaeumer.vscode-eslint"
},
"files.exclude": {
//"**/.yarn*": true,
//"**/.*.js": true,
//"**/.swc": true,
//"**/.changeset": true,
//"**/yarn.lock": true,
//"**/.*rc": true,
//"**/.*config": true,
//"**/.git*": true,
//"**/.npmignore*": true,
//"**/.husky": true,
//"**/LICENSE.*": true,
//"**/lerna.json": true,
//"**/jest.config.js": true,
},
"prettier.disableLanguages": [
"javascript",
"javascriptreact",
"typescript",
"typescriptreact"
],
"eslint.validate": [
"markdown",
"javascript",
"typescript"
],
"eslint.validate": ["markdown", "javascript", "typescript"],
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
},
Expand Down
8 changes: 4 additions & 4 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
{
"label": "clean",
"type": "shell",
"command": "yarn clean",
"command": "pnpm clean",
"isBackground": false,
"problemMatcher": []
},
{
"label": "build-watch",
"type": "shell",
"command": "yarn build-watch",
"command": "pnpm build-watch",
"problemMatcher": [
"$tsc-watch"
],
Expand All @@ -27,7 +27,7 @@
{
"label": "build",
"type": "shell",
"command": "yarn build",
"command": "pnpm build",
"problemMatcher": [],
"isBackground": false
},
Expand All @@ -37,7 +37,7 @@
"build-watch"
],
"type": "shell",
"command": "yarn test",
"command": "pnpm test",
"problemMatcher": []
}
]
Expand Down
18 changes: 0 additions & 18 deletions .yarn/patches/eslint-plugin-codegen-npm-0.16.1-87770191cd

This file was deleted.

363 changes: 0 additions & 363 deletions .yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs

This file was deleted.

9 changes: 0 additions & 9 deletions .yarn/plugins/@yarnpkg/plugin-typescript.cjs

This file was deleted.

Loading

0 comments on commit 76ba0ae

Please sign in to comment.