-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
15 changed files
with
1,489 additions
and
2,136 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
'dumba': patch | ||
--- | ||
|
||
Switch to microbundle build. | ||
Fix Eslint errors. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,6 +6,7 @@ on: | |
pull_request: | ||
branches: | ||
- master | ||
- develop | ||
jobs: | ||
build: | ||
name: Node unit tests | ||
|
@@ -28,19 +29,25 @@ jobs: | |
with: | ||
node-version: ${{ matrix.node }} | ||
|
||
- name: Install pnpm | ||
run: curl -f https://get.pnpm.io/v6.16.js | node - add --global pnpm@6 | ||
|
||
- name: Install dependencies | ||
run: pnpm install | ||
uses: pnpm/[email protected] | ||
with: | ||
version: 6.23.6 | ||
run_install: true | ||
|
||
- name: Lint source | ||
run: | | ||
pnpm lint:ci | ||
- name: Check types | ||
- name: Build packages | ||
if: matrix.node != 12 | ||
run: | | ||
pnpm build | ||
- name: Build packages for Node V12 only | ||
if: matrix.node == 12 | ||
run: | | ||
pnpm type:check | ||
pnpm build -- --filter=!docs | ||
- name: Run tests | ||
run: | | ||
|
@@ -55,9 +62,9 @@ jobs: | |
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
|
||
- name: 'Publish to NPM' | ||
- name: 'Consume changesets' | ||
if: github.event_name == 'push' && github.repository == 'ivandotv/dumba' && matrix.node == 16 && github.ref == 'refs/heads/master' | ||
uses: changesets/action@master | ||
uses: changesets/action@v1 | ||
id: 'changesets' | ||
with: | ||
# This expects you to have a script called release which does a build for your packages and calls changeset publish | ||
|
@@ -69,7 +76,7 @@ jobs: | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
- name: 'Generate docs' | ||
if: steps.changesets.outputs.published == 'true' | ||
run: pnpm docs | ||
run: pnpm gen:docs | ||
|
||
- name: Commit docs | ||
if: steps.changesets.outputs.published == 'true' | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,22 @@ | ||
coverage: | ||
status: | ||
project: | ||
default: | ||
target: auto | ||
dumba: | ||
target: auto | ||
flags: | ||
- dumba | ||
|
||
comment: | ||
layout: 'reach, diff, flags, files' | ||
behavior: default | ||
require_changes: false | ||
require_base: true | ||
require_head: true | ||
|
||
flags: | ||
# filter the folder(s) you wish to measure by that flag | ||
dumba: | ||
# only include files in the backend folder | ||
carryforward: true | ||
paths: | ||
- packages/dumba/ | ||
carryforward: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
/* eslint-disable @typescript-eslint/no-var-requires */ | ||
const pkg = require('./package.json') | ||
const { execSync } = require('child_process') | ||
|
||
const pkgVersion = process.env.PKG_VERSION || pkg.version | ||
const nodeEnv = process.env.NODE_ENV || 'production' | ||
|
||
const buildDate = execSync('git show -s --format=%ci HEAD') | ||
.toString() | ||
.replace(/[\r\n]+$/, '') | ||
|
||
const commitSha = execSync('git rev-parse --short HEAD') | ||
.toString() | ||
.replace(/[\r\n]+$/, '') | ||
|
||
const replacements = { | ||
__VERSION__: pkgVersion, | ||
__BUILD_DATE__: buildDate, | ||
__COMMIT_SHA__: commitSha, | ||
'process.env.NODE_ENV': nodeEnv | ||
} | ||
|
||
const plugins = ['dev-expression', ['transform-define', replacements]] | ||
|
||
//default babel config | ||
const config = { plugins } | ||
|
||
//babel config for Jest tests | ||
const jestConfig = { | ||
plugins, | ||
presets: [ | ||
[ | ||
'@babel/preset-env', | ||
{ | ||
targets: { | ||
node: 'current' | ||
} | ||
} | ||
], | ||
[ | ||
'@babel/preset-typescript', | ||
{ | ||
allowDeclareFields: true | ||
} | ||
] | ||
], | ||
ignore: ['node_modules'], | ||
sourceMaps: 'inline' | ||
} | ||
|
||
module.exports = process.env.NODE_ENV === 'test' ? jestConfig : config |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.