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

Commit

Permalink
feat: remove lerna dependency, close #194 (#195)
Browse files Browse the repository at this point in the history
BREAKING CHANGE: Major rewrite of monodeploy. It is now a wrapper around Yarn Berry's API, and operates directly on yarn workspaces rather than lerna. It is no longer compatible with lerna monorepos. Migration instructions are available in the README. The API and CLI interface have completely changed. Please refer to the documentation for the new usage.
  • Loading branch information
Noah authored Jan 16, 2021
1 parent 676fbd6 commit a94961e
Show file tree
Hide file tree
Showing 98 changed files with 4,782 additions and 4,163 deletions.
20 changes: 20 additions & 0 deletions .all-contributorsrc
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,26 @@
"tool",
"code"
]
},
{
"login": "noahnu",
"name": "Noah",
"avatar_url": "https://avatars0.githubusercontent.com/u/1297096?v=4",
"profile": "https://noahnu.com/",
"contributions": [
"code",
"infra"
]
},
{
"login": "mcataford",
"name": "Marc Cataford",
"avatar_url": "https://avatars2.githubusercontent.com/u/6210361?v=4",
"profile": "https://www.karnov.club/",
"contributions": [
"code",
"infra"
]
}
],
"contributorsPerLine": 7,
Expand Down
1 change: 1 addition & 0 deletions .cz.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{ "path": "@tophat/commitizen-adapter" }
43 changes: 41 additions & 2 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,45 @@
module.exports = {
extends: ['@tophat/eslint-config/base', '@tophat/eslint-config/jest'],
root: true,
parser: '@typescript-eslint/parser',
plugins: ['@typescript-eslint', 'prettier'],
extends: [
'plugin:@typescript-eslint/recommended',
'@tophat/eslint-config/base',
'@tophat/eslint-config/jest',
'prettier',
],
rules: {
'jest/no-standalone-expect': 'off',
'no-unused-vars': 'off', // covered by typescript eslint
'import/order': [
'error',
{
alphabetize: { order: 'asc' },
'newlines-between': 'always',
groups: [
'unknown',
'builtin',
'external',
'internal',
'parent',
'sibling',
'index',
],
},
],
'jest/no-standalone-expect': [
'error',
{ additionalTestBlockFunctions: ['teste2e'] },
],
},
ignorePatterns: ['example-monorepo/**/*', '.*', '**/*.js', 'lib'],
settings: {
'import/parsers': {
'@typescript-eslint/parser': ['.ts', '.js'],
},
'import/resolver': {
typescript: {
alwaysTryTypes: true,
},
},
},
}
1 change: 1 addition & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ e.g. This PR refactors the X logic, applying Y's algorithm to improve Z by K per

<!-- Please mark items as completed where appropriate. e.g. [x]. -->

- [ ] I agree to abide by the [Code of Conduct](https://github.com/tophat/monodeploy/blob/master/CODE_OF_CONDUCT.md).
- [ ] This PR has sufficient documentation.
- [ ] This PR has sufficient test coverage.
- [ ] This PR title satisfies semantic [convention](https://www.conventionalcommits.org/en/v1.0.0/#summary).
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: detect-node
description: Sets ndoe and yarn version from nvmrc and yvmrc files.
name: detect-env
description: Sets node and yarn version from nvmrc and yvmrc files.
runs:
using: "composite"
steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/auto-approve.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on: pull_request
jobs:
build:
runs-on: ubuntu-latest
if: github.actor == 'dependabot[bot]' || github.actor == 'dependabot-preview[bot]'
if: github.actor == 'dependabot[bot]'
steps:
- uses: hmarr/[email protected]
with:
Expand Down
39 changes: 0 additions & 39 deletions .github/workflows/commit-watch.yml

This file was deleted.

48 changes: 0 additions & 48 deletions .github/workflows/master-branch.yml

This file was deleted.

66 changes: 61 additions & 5 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,51 @@
name: Continuous Integration

on:
- pull_request_target
push:
branches:
- master
pull_request:

env:
CI: 1
ARTIFACT_DIR: ./artifacts

jobs:
tests:
name: Lint, Tests, and Build
commit-watch:
name: Run Commit Watch
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
with:
ref: ${{ github.event.pull_request.head.sha }}
- uses: ./.github/actions/detect-node
fetch-depth: 0
- uses: ./.github/actions/detect-env
- name: Setup Node.js
uses: actions/setup-node@v1
with:
node-version: ${{ env.NODE_VERSION }}
- name: Create artifacts directory
run: mkdir -p ${{ env.ARTIFACT_DIR }}
- name: Run Commit Watch
env:
COMMIT_WATCH_OUTPUT_DIR: ${{ env.ARTIFACT_DIR }}/
COMMITWATCH_GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
CI_REPO_OWNER: ${{ github.repository_owner }}
CI_REPO_NAME: ${{ github.event.repository.name }}
CI_COMMIT_SHA: ${{ github.event.pull_request.head.sha }}
CI_BASE_BRANCH: origin/${{ github.base_ref }}
run: yarn dlx commit-watch
- name: Upload Artifacts
uses: actions/upload-artifact@v2
with:
name: commit-watch-artifacts
path: ${{ env.ARTIFACT_DIR }}
tests:
name: Lint & Tests
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: ./.github/actions/detect-env
- name: Setup Node.js
uses: actions/setup-node@v1
with:
Expand All @@ -42,10 +72,36 @@ jobs:
run: ./.github/codecov.sh $GITHUB_EVENT_PATH
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
- name: Upload Artifacts
uses: actions/upload-artifact@v2
with:
name: report-artifacts
path: ${{ env.ARTIFACT_DIR }}
build:
name: Build
runs-on: ubuntu-20.04
needs: [tests]
steps:
- uses: actions/checkout@v2
- uses: ./.github/actions/detect-env
- name: Setup Node.js
uses: actions/setup-node@v1
with:
node-version: ${{ env.NODE_VERSION }}
- name: Create artifacts directory
run: mkdir -p ${{ env.ARTIFACT_DIR }}
- name: Restore yarn cache
id: yarn-cache
uses: actions/cache@v2
with:
path: ./.yarn/cache
key: ${{ env.NODE_VERSION }}-${{ env.YARN_VERSION }}-${{ hashFiles('yarn.lock') }}
- name: Install dependencies
run: yarn install --immutable
- name: Build
run: yarn build
- name: Upload Artifacts
uses: actions/upload-artifact@v2
with:
name: reports-and-build-artifacts
name: build-artifacts
path: ${{ env.ARTIFACT_DIR }}
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: ./.github/actions/detect-node
- uses: ./.github/actions/detect-env
- name: Setup Node.js
uses: actions/setup-node@v1
with:
Expand Down
25 changes: 16 additions & 9 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,14 +1,21 @@
.vscode/settings.json
coverage
# dependency management
node_modules
website/build
lib/
artifacts/
*.junit.xml
*.log

.yarn/*
!.yarn/releases
!.yarn/plugins
!.yarn/versions
.pnp.*
!.yarn/sdks
.pnp.*

# transient files
*.log

# build artifacts
coverage
lib
artifacts
*.junit.xml
website/build

# this is configured via bootstrap script
.vscode
4 changes: 4 additions & 0 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname $0)/_/husky.sh"

yarn commitlint -e $1
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
14.15.2
14.15.3
5 changes: 5 additions & 0 deletions .vim/coc-settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"eslint.packageManager": "yarn",
"eslint.nodePath": ".yarn/sdks",
"tsserver.tsdk": ".yarn/sdks/typescript/lib"
}
20 changes: 20 additions & 0 deletions .yarn/sdks/eslint/bin/eslint.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/usr/bin/env node

const {existsSync} = require(`fs`);
const {createRequire, createRequireFromPath} = require(`module`);
const {resolve} = require(`path`);

const relPnpApiPath = "../../../../.pnp.js";

const absPnpApiPath = resolve(__dirname, relPnpApiPath);
const absRequire = (createRequire || createRequireFromPath)(absPnpApiPath);

if (existsSync(absPnpApiPath)) {
if (!process.versions.pnp) {
// Setup the environment to be able to require eslint/bin/eslint.js
require(absPnpApiPath).setup();
}
}

// Defer to the real eslint/bin/eslint.js your application uses
module.exports = absRequire(`eslint/bin/eslint.js`);
6 changes: 6 additions & 0 deletions .yarn/sdks/eslint/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"name": "eslint",
"version": "7.16.0-pnpify",
"main": "./lib/api.js",
"type": "commonjs"
}
6 changes: 6 additions & 0 deletions .yarn/sdks/integrations.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# This file is automatically generated by PnPify.
# Manual changes will be lost!

integrations:
- vscode
- vim
Loading

0 comments on commit a94961e

Please sign in to comment.