Skip to content

Commit

Permalink
feat: tsc + ESM for object-schema
Browse files Browse the repository at this point in the history
  • Loading branch information
nzakas committed Apr 23, 2024
1 parent b489df4 commit b865844
Show file tree
Hide file tree
Showing 25 changed files with 2,261 additions and 0 deletions.
57 changes: 57 additions & 0 deletions .github/ISSUE_TEMPLATE/bug-report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: "\U0001F41E Report a problem"
description: "Report a problem with ESLint"
title: "Bug: (fill in)"
labels:
- bug
- "repro:needed"
body:
- type: checkboxes
attributes:
label: Which packages are affected?
options:
- label: "`@eslint/object-schema`"
required: false
- type: textarea
attributes:
label: Environment
description: |
Please provide the following information:
value: |
Node version:
npm version:
ESLint version:
Operating System:
validations:
required: true
- type: textarea
attributes:
label: What did you do?
validations:
required: true
- type: textarea
attributes:
label: What did you expect to happen?
validations:
required: true
- type: textarea
attributes:
label: What actually happened?
validations:
required: true
- type: input
attributes:
label: Link to Minimal Reproducible Example
description: "Link to a [StackBlitz](https://stackblitz.com) or GitHub repo with a minimal reproduction of the problem. **A minimal reproduction is required** so that others can help debug your issue. If a report is vague (e.g. just a generic error message) and has no reproduction, it may be auto-closed."
placeholder: "https://stackblitz.com/abcd1234"
validations:
required: true
- type: checkboxes
attributes:
label: Participation
options:
- label: I am willing to submit a pull request for this issue.
required: false
- type: textarea
attributes:
label: Additional comments
description: Is there anything else you'd like to mention?
40 changes: 40 additions & 0 deletions .github/ISSUE_TEMPLATE/change.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: "\U0001F680 Request a change"
description: "Request a new feature or change to an existing feature"
title: "Change Request: (fill in)"
labels:
- enhancement
body:
- type: checkboxes
attributes:
label: Which packages would you like to change?
options:
- label: "`@eslint/object-schema`"
required: false
- type: textarea
attributes:
label: What problem do you want to solve?
description: |
Please explain your use case in as much detail as possible without referring to a specific solution.
placeholder: |
humanfs currently...
validations:
required: true
- type: textarea
attributes:
label: What do you think is the correct solution?
description: |
Please explain how you'd like to change humanfs to address the problem.
placeholder: |
I'd like humanfs to...
validations:
required: true
- type: checkboxes
attributes:
label: Participation
options:
- label: I am willing to submit a pull request for this change.
required: false
- type: textarea
attributes:
label: Additional comments
description: Is there anything else you'd like to mention?
5 changes: 5 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
blank_issues_enabled: false
contact_links:
- name: 🗣 Ask a Question, Discuss
url: https://github.com/eslint/rewrite/discussions
about: Get help using ESLint
37 changes: 37 additions & 0 deletions .github/ISSUE_TEMPLATE/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: "\U0001F4DD Docs"
description: "Request an improvement to documentation"
title: "Docs: (fill in)"
labels:
- documentation
body:
- type: textarea
attributes:
label: Docs page(s)
description: |
What page(s) are you suggesting be changed or created?
validations:
required: true
- type: textarea
attributes:
label: What documentation issue do you want to solve?
description: |
Please explain your issue in as much detail as possible.
validations:
required: true
- type: textarea
attributes:
label: What do you think is the correct solution?
description: |
Please explain how you'd like to change the ESLint docs to address the problem.
validations:
required: true
- type: checkboxes
attributes:
label: Participation
options:
- label: I am willing to submit a pull request for this change.
required: false
- type: textarea
attributes:
label: Additional comments
description: Is there anything else you'd like to mention?
33 changes: 33 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: CI

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
build:
runs-on: ${{ matrix.os }}

strategy:
matrix:
os: [windows-latest, macOS-latest, ubuntu-latest]
node-version: [18.x, 20.x]

steps:
- uses: actions/checkout@v4

- name: Set up Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}

- name: npm install and test
run: |
npm install
npm test
env:
CI: true
71 changes: 71 additions & 0 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
on:
push:
branches:
- main

name: release-please

permissions:
contents: write
pull-requests: write
id-token: write

jobs:
release-please:
runs-on: ubuntu-latest
steps:
- uses: GoogleCloudPlatform/release-please-action@v4
id: release
with:
token: ${{secrets.GITHUB_TOKEN}}

# Output which releases were created
- run: echo "A release was created."
if: ${{ steps.release.outputs.releases_created }}

# Check to see if we need to do any releases and if so check out the repo
- uses: actions/checkout@v4
if: ${{ steps.release.outputs.releases_created }}

# Node.js release
- uses: actions/setup-node@v4
if: ${{ steps.release.outputs.releases_created }}
with:
node-version: lts/*
registry-url: "https://registry.npmjs.org"

- run: npm ci
if: ${{ steps.release.outputs.releases_created }}

#-----------------------------------------------------------------------------
# @eslint/objects-schema
#-----------------------------------------------------------------------------

- name: Publish @eslint/object-schema package to npm
run: npm publish -w packages/object-schema
if: ${{ steps.release.outputs['packages/object-schema--release_created'] }}
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}

- name: Publish @eslint/object-schema package to JSR
run: |
npm run build --if-present
npx jsr publish
working-directory: packages/object-schema
if: ${{ steps.release.outputs['packages/object-schema--release_created'] }}

- name: Tweet Release Announcement
run: npx @humanwhocodes/tweet "@eslint/object-schema v${{ steps.release.outputs['packages/object-schema--major'] }}.${{ steps.release.outputs['packages/core--minor'] }}.${{ steps.release.outputs['packages/core--patch'] }} has been released!\n\n${{ github.event.repository.html_url }}/releases/tag/v${{ steps.release.outputs['packages/core--tag_name'] }}"
if: ${{ steps.release.outputs['packages/object-schema--release_created'] }}
env:
TWITTER_CONSUMER_KEY: ${{ secrets.TWITTER_CONSUMER_KEY }}
TWITTER_CONSUMER_SECRET: ${{ secrets.TWITTER_CONSUMER_SECRET }}
TWITTER_ACCESS_TOKEN_KEY: ${{ secrets.TWITTER_ACCESS_TOKEN_KEY }}
TWITTER_ACCESS_TOKEN_SECRET: ${{ secrets.TWITTER_ACCESS_TOKEN_SECRET }}

- name: Toot Release Announcement
run: npx @humanwhocodes/toot "@eslint/object-schema v${{ steps.release.outputs['packages/object-schema--major'] }}.${{ steps.release.outputs['packages/object-schema--minor'] }}.${{ steps.release.outputs['packages/object-schema--patch'] }} has been released!\n\n${{ github.event.repository.html_url }}/releases/tag/v${{ steps.release.outputs['packages/object-schema--tag_name'] }}"'
if: ${{ steps.release.outputs['packages/object-schema--release_created'] }}
env:
MASTODON_ACCESS_TOKEN: ${{ secrets.MASTODON_ACCESS_TOKEN }}
MASTODON_HOST: ${{ secrets.MASTODON_HOST }}
3 changes: 3 additions & 0 deletions .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"packages/object-schema": "2.0.3"
}
40 changes: 40 additions & 0 deletions packages/object-schema/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# Changelog

## [2.0.3](https://github.com/humanwhocodes/object-schema/compare/v2.0.2...v2.0.3) (2024-04-01)


### Bug Fixes

* Ensure test files are not including in package ([6eeb32c](https://github.com/humanwhocodes/object-schema/commit/6eeb32cc76a3e37d76b2990bd603d72061c816e0)), closes [#19](https://github.com/humanwhocodes/object-schema/issues/19)

## [2.0.2](https://github.com/humanwhocodes/object-schema/compare/v2.0.1...v2.0.2) (2024-01-10)


### Bug Fixes

* WrapperError should be an actual error ([2523f01](https://github.com/humanwhocodes/object-schema/commit/2523f014168167e5a40bb63e0cc03231b2c0f1bf))

## [2.0.1](https://github.com/humanwhocodes/object-schema/compare/v2.0.0...v2.0.1) (2023-10-20)


### Bug Fixes

* Custom properties should be available on thrown errors ([6ca80b0](https://github.com/humanwhocodes/object-schema/commit/6ca80b001a4ffb678b9b5544fc53322117374376))

## [2.0.0](https://github.com/humanwhocodes/object-schema/compare/v1.2.1...v2.0.0) (2023-10-18)


### ⚠ BREAKING CHANGES

* Throw custom errors instead of generics.

### Features

* Throw custom errors instead of generics. ([c6c01d7](https://github.com/humanwhocodes/object-schema/commit/c6c01d71eb354bf7b1fb3e883c40f7bd9b61647c))

### [1.2.1](https://www.github.com/humanwhocodes/object-schema/compare/v1.2.0...v1.2.1) (2021-11-02)


### Bug Fixes

* Never return original object from individual config ([5463c5c](https://www.github.com/humanwhocodes/object-schema/commit/5463c5c6d2cb35a7b7948dffc37c899a41d1775f))

0 comments on commit b865844

Please sign in to comment.