Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: support development on Node 20 #725

Merged
merged 38 commits into from May 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
bd6ab20
fix: support development on Node 20
nickmccurdy Apr 22, 2023
654e017
chore: update pnpm
nickmccurdy Apr 22, 2023
2246980
ci: default to latest (not LTS) Node
nickmccurdy Apr 22, 2023
ae35fc9
ci: test on all supported Node versions
nickmccurdy Apr 22, 2023
cf6f507
ci: run typecheck
nickmccurdy Apr 22, 2023
99e78ff
ci: run format
nickmccurdy Apr 22, 2023
034431d
Revert "ci: default to latest (not LTS) Node"
nickmccurdy Apr 26, 2023
a384c6c
Revert "ci: run typecheck"
nickmccurdy Apr 26, 2023
9830b1b
fix: format again
nickmccurdy Apr 26, 2023
d2aa2f4
ci: revert tested Node versions
nickmccurdy Apr 26, 2023
33179b5
ci: extract checkFormat script
nickmccurdy Apr 26, 2023
ca4e6df
fix: ignore `narrow.md` with broken formatting
nickmccurdy Apr 26, 2023
fd85a9b
fix: revert broken formatting
nickmccurdy Apr 26, 2023
aa16386
docs: add note about Prettier bug to ignore
nickmccurdy Apr 26, 2023
8f412c0
fix: use ts-node/esm loader instead of ts-node cli
nickmccurdy Apr 27, 2023
716a4b4
fix: add missing spaces in commands
nickmccurdy Apr 27, 2023
395818b
fix: revert broken formatting
nickmccurdy Apr 27, 2023
07d7cdf
Merge branch 'main' into fix-node-20
ssalbdivad Apr 28, 2023
ba8d90b
merge main
ssalbdivad Apr 28, 2023
966b1b4
twitch from ts-node to tsx
ssalbdivad Apr 28, 2023
809b291
continue
ssalbdivad Apr 28, 2023
3f07a71
fix test explorer
ssalbdivad Apr 28, 2023
aa7b36e
reintegrate ts-node
ssalbdivad Apr 29, 2023
151ba18
begin simplifying CLI
ssalbdivad Apr 29, 2023
f485ca6
begin removing attest cli
ssalbdivad Apr 30, 2023
eecb853
initial config implementation for new attest
ssalbdivad Apr 30, 2023
2abb764
continue fixing test infra
ssalbdivad Apr 30, 2023
35db10c
continue simplifying test config
ssalbdivad Apr 30, 2023
8198117
continue fixing attes
ssalbdivad Apr 30, 2023
19ef1e2
continue simplifying attest
ssalbdivad Apr 30, 2023
9d06187
fix attest tests
ssalbdivad Apr 30, 2023
fd01493
continue repo cleanup
ssalbdivad Apr 30, 2023
2c2085a
remove old docs versions
ssalbdivad Apr 30, 2023
45b6483
simplify CI process
ssalbdivad Apr 30, 2023
accfd3b
more CI simplifications
ssalbdivad Apr 30, 2023
ee7a264
ensure snapshots are written when not using types
ssalbdivad Apr 30, 2023
bf063ca
loosen bench timeout, remove node-latest from CI
ssalbdivad Apr 30, 2023
d65707e
remove test build, simplify build process
May 1, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/CONTRIBUTING.md
Expand Up @@ -77,7 +77,7 @@ pnpm prChecks
You can also run any of these commands individually:

```sh @lineFrom:package.json:scripts/prChecks
"pnpm install && pnpm build && pnpm buildAttest && pnpm typecheck && pnpm lint && pnpm testRepo && pnpm docgen && pnpm buildSite"
"pnpm install && pnpm build && pnpm lint && pnpm checkFormat && pnpm testRepo && pnpm docgen && pnpm buildSite"
```

All of these commands will run as part of our CI process and must succeed in order for us to accept your Pull Request.
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/setup/action.yml
Expand Up @@ -11,7 +11,7 @@ runs:
- name: Setup pnpm
uses: pnpm/action-setup@v2
with:
version: 7.1.2
version: 8.3.1

- name: Setup Node (${{ inputs.node }})
uses: actions/setup-node@v3
Expand Down
22 changes: 6 additions & 16 deletions .github/workflows/pr.yml
Expand Up @@ -21,17 +21,8 @@ jobs:
- name: Setup repo
uses: ./.github/actions/setup

- name: Lint
run: pnpm lint

- name: Test
run: pnpm testRepo

- name: Docgen
run: pnpm docgen

- name: Site
run: pnpm buildSite
- name: prChecks
run: pnpm prChecks

compatibility:
needs: core
Expand All @@ -43,8 +34,10 @@ jobs:
include:
- os: ubuntu-latest
node: lts/-1
- os: ubuntu-latest
node: latest
# https://github.com/arktypeio/arktype/issues/738
# - os: ubuntu-latest
# node: latest
fail-fast: false

runs-on: ${{ matrix.os }}
steps:
Expand All @@ -61,9 +54,6 @@ jobs:
- name: Test
run: pnpm testRepo

- name: Site
run: pnpm buildSite

prChecks:
needs: compatibility
timeout-minutes: 1
Expand Down
7 changes: 2 additions & 5 deletions .github/workflows/publish.yml
Expand Up @@ -21,11 +21,8 @@ jobs:
- name: Setup repo
uses: ./.github/actions/setup

- name: Docgen
run: pnpm docgen

- name: Site
run: pnpm buildSite
- name: Build docs
run: pnpm buildDocs

- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
Expand Down
2 changes: 1 addition & 1 deletion .vscode/settings.json
Expand Up @@ -23,7 +23,7 @@
"--no-warnings=ExperimentalWarning"
],
"mochaExplorer.env": {
"ARKTYPE_CHECK_CMD": "--skipTypes"
"ATTEST_CONFIG": "{ \"skipTypes\": true }"
},
"testExplorer.useNativeTesting": true
}
4 changes: 2 additions & 2 deletions README.md
Expand Up @@ -19,7 +19,7 @@
<!-- @snipEnd -->

```ts @blockFrom:dev/test/examples/type.ts
import { type } from "#arktype"
import { type } from "../../src/main.js"

// Definitions are statically parsed and inferred as TS.
export const user = type({
Expand Down Expand Up @@ -65,7 +65,7 @@ _Our APIs have mostly stabilized, but details may still change during the alpha/
[Try this example in-browser.](https://arktype.io/docs/scopes)

```ts @blockFrom:dev/test/examples/scope.ts
import { scope } from "#arktype"
import { scope } from "../../src/main.js"

// Scopes are collections of types that can reference each other.
export const types = scope({
Expand Down
1 change: 1 addition & 0 deletions dev/arktype.io/CNAME
@@ -0,0 +1 @@
arktype.io
2 changes: 1 addition & 1 deletion dev/arktype.io/docs/demos/generated/demo.ts
@@ -1,4 +1,4 @@
export default `import { type } from "#arktype"
export default `import { type } from "../../src/main.js"

// Define your type...
export const pkg = type({
Expand Down
2 changes: 1 addition & 1 deletion dev/arktype.io/docs/demos/generated/optimized.ts
@@ -1,4 +1,4 @@
export default `import { type, union } from "#arktype"
export default `import { type, union } from "../../src/main.js"

export const deepLeftOrRight = union(
{
Expand Down
2 changes: 1 addition & 1 deletion dev/arktype.io/docs/demos/generated/scope.ts
@@ -1,4 +1,4 @@
export default `import { scope } from "#arktype"
export default `import { scope } from "../../src/main.js"

// Scopes are collections of types that can reference each other.
export const types = scope({
Expand Down
2 changes: 1 addition & 1 deletion dev/arktype.io/docs/demos/generated/type.ts
@@ -1,4 +1,4 @@
export default `import { type } from "#arktype"
export default `import { type } from "../../src/main.js"

// Definitions are statically parsed and inferred as TS.
export const user = type({
Expand Down
10 changes: 4 additions & 6 deletions dev/arktype.io/package.json
Expand Up @@ -4,10 +4,9 @@
"private": true,
"scripts": {
"dev": "docusaurus start",
"build": "ts-node ../scripts/buildArktypeIo.ts",
"build": "node --loader ts-node/esm ../scripts/docgen.ts && pnpm docusaurus build --out-dir dist && cp CNAME dist",
"typecheck": "tsc",
"serve": "docusaurus serve --dir dist",
"docgen": "cd .. && pnpm docgen"
"serve": "docusaurus serve --dir dist"
},
"dependencies": {
"@docusaurus/core": "2.4.0",
Expand All @@ -19,23 +18,22 @@
"@emotion/styled": "11.10.6",
"@mdx-js/react": "1.6.22",
"@mui/icons-material": "5.11.9",
"@mui/material": "5.11.10",
"@mui/lab": "5.0.0-alpha.121",
"@mui/material": "5.11.10",
"@stackblitz/sdk": "1.8.2",
"framer-motion": "6.5.1",
"prism-react-renderer": "1.3.5",
"react": "17.0.2",
"react-dom": "17.0.2"
},
"devDependencies": {
"@types/node": "18.15.11",
"@docusaurus/module-type-aliases": "2.4.0",
"@docusaurus/types": "2.4.0",
"@tsconfig/docusaurus": "1.0.7",
"@types/node": "18.15.11",
"@types/react": "17.0.2",
"@types/react-dom": "17.0.2",
"arktype": "link:../..",
"ts-node": "10.9.1",
"typescript": "5.0.3"
},
"pnpm": {
Expand Down