Skip to content

Commit

Permalink
chore(deps): upgrading deps (#129)
Browse files Browse the repository at this point in the history
BREAKING CHANGE: upgrading many new major versions including typescript
  • Loading branch information
Daniel A. White committed Jun 13, 2024
1 parent aad186d commit 7acbc02
Show file tree
Hide file tree
Showing 48 changed files with 6,979 additions and 6,432 deletions.
34 changes: 15 additions & 19 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
version: 2.1

executors:
node16:
docker:
- image: cimg/node:16.20
node18:
docker:
- image: cimg/node:18.19
- image: cimg/node:18.20
node20:
docker:
- image: cimg/node:20.14
node22:
docker:
- image: cimg/node:22.1

jobs:
test_node_lts:
docker:
- image: cimg/node:lts
test:
executor: node18
steps:
- checkout
- run: yarn
Expand All @@ -31,40 +33,34 @@ jobs:
- run: ./test/test-build-on-repository.sh << parameters.repository >>

release:
docker:
- image: circleci/node:lts
executor: node18
steps:
- checkout
- run: yarn
- run: yarn build
- run: yarn release

workflows:
version: 2
test_and_release:
jobs:
- test_build_on_repository:
matrix:
parameters:
node-version:
- node18
- node20
- node22
repository:
- elements
- json
# - markdown // private
# - markdown-viewer // private
- json-schema-tree
- test_build_on_repository:
matrix:
parameters:
node-version:
- node16
repository:
- elements
- json-schema-viewer
- test_node_lts
- test
- release:
filters:
branches:
only: master
requires:
- test_node_lts
- test
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
dist/
3 changes: 3 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
extends: ['@stoplight'],
};
1 change: 1 addition & 0 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
npx commitlint -e
1 change: 1 addition & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
npm test
3 changes: 3 additions & 0 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
...require('@stoplight/eslint-config/prettier.config'),
};
118 changes: 56 additions & 62 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
# @stoplight/scripts

[![Maintainability](https://api.codeclimate.com/v1/badges/2628d0fe95cf3abae711/maintainability)](https://codeclimate.com/github/stoplightio/scripts/maintainability) [![Test Coverage](https://api.codeclimate.com/v1/badges/2628d0fe95cf3abae711/test_coverage)](https://codeclimate.com/github/stoplightio/scripts/test_coverage)
[![Maintainability](https://api.codeclimate.com/v1/badges/2628d0fe95cf3abae711/maintainability)](https://codeclimate.com/github/stoplightio/scripts/maintainability)
[![Test Coverage](https://api.codeclimate.com/v1/badges/2628d0fe95cf3abae711/test_coverage)](https://codeclimate.com/github/stoplightio/scripts/test_coverage)

<!-- toc -->
* [@stoplight/scripts](#stoplightscripts)
* [Usage](#usage)
* [Commands](#commands)
* [Overriding Configs](#overriding-configs)

- [@stoplight/scripts](#stoplightscripts)
- [Usage](#usage)
- [Commands](#commands)
- [Overriding Configs](#overriding-configs)
<!-- tocstop -->

# Usage
Expand All @@ -20,47 +22,55 @@ npx @stoplight/scripts create:lib
# Commands

<!-- commands -->
* [`sl-scripts build`](#sl-scripts-build)
* [`sl-scripts bundle`](#sl-scripts-bundle)
* [`sl-scripts create:lib`](#sl-scripts-createlib)
* [`sl-scripts help [COMMAND]`](#sl-scripts-help-command)
* [`sl-scripts release`](#sl-scripts-release)
* [`sl-scripts release:docs`](#sl-scripts-releasedocs)

- [`sl-scripts build`](#sl-scripts-build)
- [`sl-scripts bundle`](#sl-scripts-bundle)
- [`sl-scripts create:lib`](#sl-scripts-createlib)
- [`sl-scripts release`](#sl-scripts-release)
- [`sl-scripts release:docs`](#sl-scripts-releasedocs)

## `sl-scripts build`

Build source code

```
USAGE
$ sl-scripts build
$ sl-scripts build [--verbose]
OPTIONS
FLAGS
--verbose moar logs
EXAMPLE
DESCRIPTION
Build source code
EXAMPLES
$ sl-scripts build
```

_See code: [dist/commands/build/index.ts](https://github.com/stoplightio/scripts/blob/v0.0.0/dist/commands/build/index.ts)_
_See code:
[src/commands/build/index.ts](https://github.com/stoplightio/scripts/blob/v0.0.0/src/commands/build/index.ts)_

## `sl-scripts bundle`

Bundle source code

```
USAGE
$ sl-scripts bundle
$ sl-scripts bundle [--minify] [--verbose]
OPTIONS
FLAGS
--minify minify output using terser
--verbose moar logs
EXAMPLE
DESCRIPTION
Bundle source code
EXAMPLES
$ sl-scripts bundle
```

_See code: [dist/commands/bundle/index.ts](https://github.com/stoplightio/scripts/blob/v0.0.0/dist/commands/bundle/index.ts)_
_See code:
[src/commands/bundle/index.ts](https://github.com/stoplightio/scripts/blob/v0.0.0/src/commands/bundle/index.ts)_

## `sl-scripts create:lib`

Expand All @@ -70,64 +80,60 @@ Scaffold out a new library.
USAGE
$ sl-scripts create:lib
EXAMPLE
$ sl-scripts create:lib
```

_See code: [dist/commands/create/lib.ts](https://github.com/stoplightio/scripts/blob/v0.0.0/dist/commands/create/lib.ts)_

## `sl-scripts help [COMMAND]`

display help for sl-scripts

```
USAGE
$ sl-scripts help [COMMAND]
ARGUMENTS
COMMAND command to show help for
DESCRIPTION
Scaffold out a new library.
OPTIONS
--all see all commands in CLI
EXAMPLES
$ sl-scripts create:lib
```

_See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/v2.2.3/src/commands/help.ts)_
_See code: [src/commands/create/lib.ts](https://github.com/stoplightio/scripts/blob/v0.0.0/src/commands/create/lib.ts)_

## `sl-scripts release`

Publish new src or docs release.

```
USAGE
$ sl-scripts release
$ sl-scripts release [--verbose]
OPTIONS
FLAGS
--verbose moar logs
DESCRIPTION
Publish new src or docs release.
EXAMPLES
$ sl-scripts release
$ sl-scripts release:docs
```

_See code: [dist/commands/release/index.ts](https://github.com/stoplightio/scripts/blob/v0.0.0/dist/commands/release/index.ts)_
_See code:
[src/commands/release/index.ts](https://github.com/stoplightio/scripts/blob/v0.0.0/src/commands/release/index.ts)_

## `sl-scripts release:docs`

Push built docs to github pages.

```
USAGE
$ sl-scripts release:docs
$ sl-scripts release:docs [--dry-run] [--verbose]
OPTIONS
FLAGS
--dry-run run the release process but do not publish
--verbose moar logs
EXAMPLE
DESCRIPTION
Push built docs to github pages.
EXAMPLES
$ sl-scripts release:docs
```

_See code: [dist/commands/release/docs.ts](https://github.com/stoplightio/scripts/blob/v0.0.0/dist/commands/release/docs.ts)_
_See code:
[src/commands/release/docs.ts](https://github.com/stoplightio/scripts/blob/v0.0.0/src/commands/release/docs.ts)_

<!-- commandsstop -->

# Overriding Configs
Expand All @@ -139,7 +145,7 @@ Simply create a `jest.config.js` file in the root of your project, and extend th
```js
// ./jest.config.js
module.exports = {
preset: "@stoplight/scripts",
preset: '@stoplight/scripts',
};
```

Expand All @@ -158,17 +164,6 @@ Simply create a `tsconfig.json` file in the root of your project, and extend the
}
```

## TSLint

Simply create a `tslint.json` file in the root of your project, and extend the default config. For example:

```json
// ./tslint.json
{
"extends": ["@stoplight/scripts/tslint.json"]
}
```

## Semantic Release

Simply add a `release` property to your `package.json` file. For example:
Expand All @@ -179,18 +174,17 @@ Simply add a `release` property to your `package.json` file. For example:
// ... props
"release": {
"pkgRoot": "dist",
"plugins": [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator"
]
"plugins": ["@semantic-release/commit-analyzer", "@semantic-release/release-notes-generator"]
}
// ... props
}
```

## Rollup

By default all `dependencies` and `peerDependencies` declared in your `package.json` will be treated as external deps during `sl-scripts bundle`. If you would like to always bundle a dep, list those deps in your `package.json` file like so:
By default all `dependencies` and `peerDependencies` declared in your `package.json` will be treated as external deps
during `sl-scripts bundle`. If you would like to always bundle a dep, list those deps in your `package.json` file like
so:

```json
{
Expand Down
13 changes: 8 additions & 5 deletions jest-preset.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,14 @@ module.exports = {
moduleFileExtensions: ['ts', 'tsx', 'js'],
coveragePathIgnorePatterns: ['/node_modules/', '/__tests__/', '/__stories__/', '__mocks__/', 'index.ts', 'types.ts'],
collectCoverageFrom: ['src/**/*.{ts,tsx}'],
globals: {
'ts-jest': {
diagnostics: {
ignoreCodes: [151001],
transform: {
'^.+\\.tsx?$': [
'ts-jest',
{
diagnostics: {
ignoreCodes: [151001],
},
},
},
],
},
};
Loading

0 comments on commit 7acbc02

Please sign in to comment.