Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat!: bump deps, require node 12, use changesets #18

Merged
merged 3 commits into from
May 12, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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)
15 changes: 15 additions & 0 deletions .changeset/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json",
"changelog": [
"@changesets/changelog-github",
{
"repo": "1stG/configs"
}
],
"commit": false,
"linked": [],
"access": "restricted",
"baseBranch": "master",
"updateInternalDependencies": "patch",
"ignore": []
}
14 changes: 14 additions & 0 deletions .changeset/sour-masks-heal.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
"@1stg/app-config": major
"@1stg/babel-preset": patch
"@1stg/common-config": major
"@1stg/eslint-config": major
"@1stg/husky-config": patch
"@1stg/lib-config": major
"@1stg/lint-staged": patch
"@1stg/postcss-config": major
"@1stg/prettier-config": patch
"@1stg/tslint-config": minor
---

feat!: bump deps, require node 12, use changesets
5 changes: 5 additions & 0 deletions .codesandbox/ci.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"node": "14",
"buildCommand": false,
"sandboxes": []
}
2 changes: 1 addition & 1 deletion .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
github: [JounQin]
open_collective: rxts
open_collective: 1stG
68 changes: 68 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
name: CI

on:
- push
- pull_request

jobs:
ci:
name: Lint and Test with Node.js ${{ matrix.node }}
strategy:
matrix:
node:
- 12
- 14
- 16
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@master

- name: Setup Node.js ${{ matrix.node }}
uses: actions/setup-node@master
with:
node-version: ${{ matrix.node }}

- name: Link Yarn global binaries into PATH
run: echo "$(yarn global bin)" >> $GITHUB_PATH

- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"

- uses: actions/cache@v2
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-

- name: Install Dependencies
run: yarn --frozen-lockfile

- name: Check, Lint and test
run: |
yarn run check
yarn browserslist
yarn lint
yarn test
env:
EFF_NO_LINK_RULES: true
PARSER_NO_WATCH: true

- name: Check Postcss
run: |
yarn global add postcss postcss-cli
NODE_ENV=production postcss tests/test.css --verbose

- name: Codecov
run: |
yarn global add codecov
codecov
bash <(curl -Ls https://coverage.codacy.com/get.sh)
env:
CI: 'true'
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
CODACY_ACCOUNT_TOKEN: ${{ secrets.CODACY_ACCOUNT_TOKEN }}
CODACY_PROJECT_TOKEN: ${{ secrets.CODACY_PROJECT_TOKEN }}
83 changes: 0 additions & 83 deletions .github/workflows/nodejs.yml

This file was deleted.

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

on:
push:
branches:
- main

jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@master
with:
# This makes Actions fetch all Git history so that Changesets can generate changelogs with the correct commits
fetch-depth: 0

- name: Setup Node.js 14.x
uses: actions/setup-node@master
with:
node-version: 14.x

- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"

- uses: actions/cache@v2
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-

- name: Install Dependencies
# https://github.com/atlassian/changesets/issues/246
run: |
yarn --frozen-lockfile
rm -rf .git/hooks/commit-msg

- name: Create Release Pull Request or Publish to npm
id: changesets
uses: changesets/action@master
with:
# This expects you to have a script called release which does a build for your packages and calls changeset publish
publish: yarn release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# @1stG/configs

[![GitHub Actions](https://github.com/1stG/configs/workflows/Node%20CI/badge.svg)](https://github.com/1stG/configs/actions?query=workflow%3A%22Node+CI%22)
[![GitHub Actions](https://github.com/1stg/configs/workflows/CI/badge.svg)](https://github.com/1stG/configs/actions/workflows/ci.yml)
[![GitHub release](https://img.shields.io/github/release/1stg/configs)](https://github.com/1stg/configs/releases)
[![Codacy Grade](https://img.shields.io/codacy/grade/ee1a96f680514c038128710a67f7e973)](https://www.codacy.com/gh/1stG/configs)
[![Codacy Grade](https://img.shields.io/codacy/grade/ee1a96f680514c038128710a67f7e973)](https://app.codacy.com/gh/1stG/configs)
[![type-coverage](https://img.shields.io/badge/dynamic/json.svg?label=type-coverage&prefix=%E2%89%A5&suffix=%&query=$.typeCoverage.atLeast&uri=https%3A%2F%2Fraw.githubusercontent.com%2F1stG%2Fconfigs%2Fmaster%2Fpackage.json)](https://github.com/plantain-00/type-coverage)
[![David Dev](https://img.shields.io/david/dev/1stg/configs.svg)](https://david-dm.org/1stg/configs?type=dev)

Expand All @@ -11,7 +11,6 @@
[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg)](http://standardjs.com)
[![Code Style: Prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg)](https://github.com/prettier/prettier)
[![lerna](https://img.shields.io/badge/maintained%20with-lerna-cc00ff.svg)](https://lerna.js.org)
[![codechecks.io](https://raw.githubusercontent.com/codechecks/docs/master/images/badges/badge-default.svg?sanitize=true)](https://codechecks.io)

> Personal but Shareable Configurations for all 1stG.me projects.

Expand Down
23 changes: 13 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,32 +21,35 @@
"lint:ts": "tslint -p . -t stylish",
"lint:tsc": "tsc",
"postinstall": "simple-git-hooks && yarn-deduplicate --strategy fewer || exit 0",
"release": "changeset publish",
"test": "jest ---collectCoverage",
"typecov": "type-coverage"
},
"devDependencies": {
"@angular/core": "^11.2.12",
"@angular/core": "^11.2.13",
"@changesets/changelog-github": "^0.4.0",
"@changesets/cli": "^2.16.0",
"@types/jest": "^26.0.23",
"@types/node": "^15.0.1",
"@types/react": "^17.0.4",
"@types/node": "^15.0.2",
"@types/react": "^17.0.5",
"@types/unist": "^2.0.3",
"core-js": "^3.11.1",
"core-js": "^3.12.1",
"lerna": "^4.0.0",
"npm-run-all": "^4.1.5",
"postcss": "^8.2.13",
"postcss": "^8.2.15",
"react": "^17.0.2",
"rxjs": "^7.0.0",
"svelte": "^3.37.0",
"ts-jest": "^26.5.5",
"rxjs": "^7.0.1",
"svelte": "^3.38.2",
"ts-jest": "^26.5.6",
"tslint": "^6.1.3",
"type-coverage": "^2.17.5",
"typescript": "^4.2.4",
"vue": "^2.6.12",
"yarn-deduplicate": "^3.1.0"
},
"resolutions": {
"@babel/core": "^7.13.15",
"prettier": "^2.2.1"
"@babel/core": "^7.14.0",
"prettier": "^2.3.0"
},
"typeCoverage": {
"atLeast": 100,
Expand Down
8 changes: 4 additions & 4 deletions packages/app-config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"author": "JounQin <[email protected]>",
"license": "MIT",
"engines": {
"node": ">=10.0.0"
"node": ">=12"
},
"dependencies": {
"@1stg/browserslist-config": "^1.0.0",
Expand All @@ -16,9 +16,9 @@
"@1stg/stylelint-config": "^1.3.2",
"@pkgr/es-modules": "^0.4.0",
"@pkgr/imagemin": "^0.6.0",
"browserslist": "^4.16.5",
"postcss": "^8.2.13",
"stylelint": "^13.13.0"
"browserslist": "^4.16.6",
"postcss": "^8.2.15",
"stylelint": "^13.13.1"
},
"publishConfig": {
"access": "public"
Expand Down
4 changes: 2 additions & 2 deletions packages/babel-preset/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ module.exports = declare(
metadata,
useBuiltIns = 'usage',
decoratorsLegacy = true,
classLoose = decoratorsLegacy === true,
classLoose,
decoratorsBeforeExport = decoratorsLegacy === true ? undefined : true,
},
) => {
Expand All @@ -36,7 +36,6 @@ module.exports = declare(
const proposalTsOptions = { classLoose, decoratorsLegacy, isTSX }

const presets = [
[proposalTypeScriptPreset, proposalTsOptions],
[
require('@babel/preset-env'),
{
Expand All @@ -60,6 +59,7 @@ module.exports = declare(
useBuiltIns,
},
],
[proposalTypeScriptPreset, proposalTsOptions],
]

if (typescript) {
Expand Down
8 changes: 4 additions & 4 deletions packages/babel-preset/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@
"node": ">=6.9.0"
},
"peerDependencies": {
"@babel/core": ">=7.9.0"
"@babel/core": ">=7.14.1"
},
"dependencies": {
"@babel/helper-plugin-utils": "^7.13.0",
"@babel/plugin-proposal-class-properties": "^7.13.0",
"@babel/plugin-proposal-decorators": "^7.13.15",
"@babel/preset-env": "^7.13.15",
"@babel/preset-env": "^7.14.1",
"@babel/preset-react": "^7.13.13",
"@babel/preset-typescript": "^7.13.0",
"@pkgr/utils": "^0.7.1",
Expand All @@ -26,8 +26,8 @@
"babel-plugin-transform-react-remove-prop-types": "^0.4.24",
"babel-plugin-transform-remove-console": "^6.9.4",
"babel-plugin-transform-typescript-metadata": "^0.3.2",
"babel-preset-proposal-typescript": "^2.0.2",
"core-js": "^3.11.1",
"babel-preset-proposal-typescript": "^2.1.0",
"core-js": "^3.12.1",
"fast-async": "^7.0.6"
},
"publishConfig": {
Expand Down
Loading