-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #10 from jxnl/baseline-tools
Baseline tools
- Loading branch information
Showing
24 changed files
with
625 additions
and
482 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,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) |
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,14 @@ | ||
{ | ||
"$schema": "https://unpkg.com/@changesets/config@2.3.0/schema.json", | ||
"changelog": ["@changesets/changelog-github", { "repo": "jxnl/instructor-js" }], | ||
"commit": false, | ||
"fixed": [], | ||
"linked": [], | ||
"access": "restricted", | ||
"baseBranch": "main", | ||
"ignore": [], | ||
"privatePackages": { | ||
"version": true, | ||
"tag": false | ||
} | ||
} |
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,23 @@ | ||
module.exports = { | ||
$schema: "https://json.schemastore.org/eslintrc", | ||
root: true, | ||
parser: "@typescript-eslint/parser", | ||
plugins: ["@typescript-eslint", "prettier"], | ||
extends: ["plugin:@typescript-eslint/recommended", "plugin:prettier/recommended"], | ||
rules: { | ||
"prettier/prettier": "error", | ||
"linebreak-style": "off", | ||
"semi": "off", | ||
"indent": "off", | ||
"@typescript-eslint/semi": "off", | ||
"no-unused-vars": "off", | ||
"@typescript-eslint/no-unused-vars": [ | ||
"warn", | ||
{ | ||
argsIgnorePattern: "^_", | ||
varsIgnorePattern: "^_", | ||
caughtErrorsIgnorePattern: "^_" | ||
} | ||
] | ||
} | ||
} |
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,56 @@ | ||
name: Publish changesets | ||
|
||
on: | ||
pull_request: | ||
types: | ||
- closed | ||
|
||
concurrency: ${{ github.workflow }}-${{ github.ref }} | ||
permissions: {} #reset | ||
jobs: | ||
publish: | ||
if: github.repository == 'jxnl/instructor-js' && github.event.pull_request.merged == true && (startsWith(github.head_ref, 'changeset-release/main') || startsWith(github.head_ref, '_publish-trigger')) | ||
permissions: | ||
contents: write | ||
pull-requests: write | ||
|
||
name: Publish packages | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout Repo | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Setup bun | ||
uses: oven-sh/setup-bun@v1 | ||
with: | ||
bun-version: latest | ||
|
||
- name: Setup Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 20.9.0 | ||
|
||
- name: Install Dependencies | ||
run: bun i | ||
|
||
- name: Creating .npmrc | ||
run: | | ||
cat << EOF > "$HOME/.npmrc" | ||
//registry.npmjs.org/:_authToken=$NPM_TOKEN | ||
EOF | ||
env: | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
|
||
- name: Publish packages & create release | ||
id: changesets | ||
uses: changesets/action@v1 | ||
with: | ||
publish: bun publish-packages | ||
createGithubReleases: true | ||
|
||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} |
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,53 @@ | ||
name: Create changeset release PR | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
concurrency: ${{ github.workflow }}-${{ github.ref }} | ||
permissions: {} #reset | ||
env: | ||
CI: true | ||
|
||
jobs: | ||
release: | ||
if: github.repository == 'jxnl/instructor-js' | ||
permissions: | ||
contents: write | ||
pull-requests: write | ||
|
||
name: Changeset Release | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Setup Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 20.9.0 | ||
|
||
- name: Setup bun | ||
uses: oven-sh/setup-bun@v1 | ||
with: | ||
bun-version: latest | ||
|
||
- name: Setup npmrc | ||
run: echo "//npm.pkg.github.com/:_authToken=$NPM_TOKEN" > .npmrc | ||
env: | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
|
||
- name: Install Dependencies | ||
run: bun i | ||
|
||
- name: Create version PR | ||
uses: changesets/action@v1 | ||
with: | ||
version: bun run version-packages | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} |
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,34 @@ | ||
name: test-wf | ||
on: [push] | ||
|
||
jobs: | ||
|
||
test: | ||
name: run-tests | ||
runs-on: ubuntu-latest | ||
environment: OPENAI | ||
env: | ||
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Setup bun | ||
uses: oven-sh/setup-bun@v1 | ||
with: | ||
bun-version: latest | ||
|
||
- name: Setup Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 20.9.0 | ||
|
||
- name: Install Dependencies | ||
run: bun i | ||
|
||
- run: bun run type-check | ||
- run: bun run lint | ||
|
||
- run: bun test |
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,3 +1,91 @@ | ||
node_modules/ | ||
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. | ||
|
||
# dependencies | ||
node_modules | ||
/.pnp | ||
.pnp.js | ||
|
||
# testing | ||
/coverage | ||
|
||
# next.js | ||
.next/ | ||
out/ | ||
|
||
# production | ||
/build | ||
|
||
# misc | ||
.DS_Store | ||
*.pem | ||
|
||
# debug | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
|
||
# local env files | ||
.env | ||
dist/ | ||
.env.local | ||
.env.development.local | ||
.env.test.local | ||
.env.production.local | ||
|
||
# vercel | ||
.vercel | ||
.turbo | ||
|
||
node_modules | ||
.pnp | ||
.pnp.js | ||
|
||
# testing | ||
coverage | ||
|
||
# next.js | ||
.next/ | ||
out/ | ||
build | ||
|
||
# misc | ||
.DS_Store | ||
*.pem | ||
|
||
# debug | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
|
||
# local env files | ||
.env | ||
.env.local | ||
.env.development.local | ||
.env.test.local | ||
.env.production.local | ||
|
||
# turbo | ||
.turbo | ||
|
||
# vercel | ||
.vercel | ||
|
||
dist | ||
|
||
.pnp.* | ||
.yarn/* | ||
!.yarn/patches | ||
!.yarn/plugins | ||
!.yarn/releases | ||
!.yarn/sdks | ||
!.yarn/versions | ||
|
||
# vim | ||
*.sw* | ||
|
||
# env | ||
.env*.local | ||
.envrc | ||
|
||
|
||
tsconfig.tsbuildinfo | ||
|
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,4 +1,27 @@ | ||
/node_modules | ||
node_modules | ||
.next | ||
build | ||
dist | ||
*.tsbuildinfo | ||
*.gitignore | ||
*.svg | ||
*.lock | ||
*.npmignore | ||
*.sql | ||
*.png | ||
*.jpg | ||
*.jpeg | ||
*.gif | ||
*.ico | ||
*.sh | ||
Dockerfile | ||
Dockerfile.* | ||
.env | ||
.env.* | ||
LICENSE | ||
*.log | ||
.DS_Store | ||
.dockerignore | ||
*.patch | ||
*.toml | ||
|
||
# don't format tsc output, will break source maps | ||
/dist |
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,28 @@ | ||
{ | ||
"endOfLine": "lf", | ||
"semi": false, | ||
"trailingComma": "none", | ||
"arrowParens": "avoid", | ||
"singleQuote": false, | ||
"tabWidth": 2, | ||
"importOrder": [ | ||
"^(react/(.*)$)|^(react$)", | ||
"^(next/(.*)$)|^(next$)", | ||
"<THIRD_PARTY_MODULES>", | ||
"", | ||
"^types$", | ||
"^@/types/(.*)$", | ||
"^@/config/(.*)$", | ||
"^@/constants/(.*)$", | ||
"^@/lib/(.*)$", | ||
"", | ||
"^[./]" | ||
], | ||
"importOrderParserPlugins": ["typescript", "jsx", "decorators-legacy"], | ||
"plugins": [ | ||
"@ianvs/prettier-plugin-sort-imports" | ||
], | ||
"printWidth": 100, | ||
"proseWrap": "never", | ||
"quoteProps": "consistent" | ||
} |
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,2 @@ | ||
nodejs 20.9.0 | ||
bun 1.0.15 |
Oops, something went wrong.