Skip to content

Commit

Permalink
schema-dts (et al) 1.0.0 (#166)
Browse files Browse the repository at this point in the history
* Use ESM (package.type: "module") in schema-dts-gen

This raises the minimum required version of Node.js.

* Remove unused import.

* Update copyright notice.

* Switch to monorepo. Requires npm 7.

* Require npm 7.

* Make root package private and versionless.

* Add license to schema-dts-gen.

* Set projectRoot for schema-dts-gen jest config.

* Add tests to schema-dts

* Fix path for schema-dts in test.

* Another attempt at getting paths working.

* Use relative imports for now.

* Generate required dependency files before testing schema-dts

* Clean should touch schema-dts lib as well.

* Update package-lock

* Build before testing.

* Switch testing to GitHub actions.

* Use --workspaces direclty in CI

* CI: Update npm to >7 always.

* Improve shebang for schema-dts-gen.

* Centralize coverage in same CI step.
(rather than doing this multiple times)

* Fix yaml

* Update base-path to be similar to example.

* Just run tests on LTS & latest

* Clear coverage_on_travis

* Stop using projectRoot
  • Loading branch information
Eyas authored Aug 29, 2021
1 parent 8a795a1 commit 71ff605
Show file tree
Hide file tree
Showing 98 changed files with 5,768 additions and 9,756 deletions.
1 change: 0 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
node_modules/
built
dist
coverage
jest.config.js
2 changes: 1 addition & 1 deletion .eslintrc.js → .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ module.exports = {
'no-throw-literal': 'error',
'no-underscore-dangle': ['error', {allowAfterThis: true}],
'no-unsafe-finally': 'error',
'no-unused-expressions': 'error',
'no-unused-expressions': ['error', {allowShortCircuit: true}],
'no-unused-labels': 'error',
'no-var': 'error',
'object-shorthand': 'error',
Expand Down
36 changes: 36 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Node.js CI

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
build:

runs-on: ubuntu-latest

strategy:
matrix:
node-version: [14.x, 16.x]

steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- name: Update NPM # Needed while 14.x, is supported.
if: ${{ matrix.node-version == '14.x' }}
run: npm install -g npm@latest
- run: npm ci
- run: npm run build
- run: npm test
- name: Coveralls - schema-dts-gen
uses: coverallsapp/github-action@master
if: ${{ matrix.node-version == '16.x' }}
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: ./packages/schema-dts-gen/coverage/lcov.info
base-path: packages/schema-dts-gen
7 changes: 2 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
node_modules/
built
dist/gen/*
dist/schema/*
!dist/schema/package.json
!dist/schema/README.md
dist/
.nyc_output/
coverage/
coverage/
7 changes: 2 additions & 5 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
node_modules/
built
dist/gen/*
dist/schema/*
!dist/schema/package.json
!dist/schema/README.md
dist/
packages/schema-dts/lib/
.nyc_output/
coverage/
.github/
6 changes: 0 additions & 6 deletions .travis.yml

This file was deleted.

9 changes: 2 additions & 7 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
module.exports = {
preset: 'ts-jest',
testEnvironment: 'node',
testMatch: ['**/*_test.[jt]s?(x)'],
testPathIgnorePatterns: ['/node_modules/', '/built/', '/dist/'],
collectCoverage: true,
coveragePathIgnorePatterns: ['/node_modules/', '/built/', '/dist/'],
export default {
projects: ['<rootDir>/packages/*'],
};
Loading

0 comments on commit 71ff605

Please sign in to comment.