-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat!: bring nominal-symbols to monorepo
Signed-off-by: Andres Correa Casablanca <[email protected]>
- Loading branch information
Showing
57 changed files
with
3,187 additions
and
4,141 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 |
---|---|---|
@@ -1,9 +1,19 @@ | ||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
end_of_line = lf | ||
insert_final_newline = true | ||
indent_style = space | ||
|
||
[*.{css,js,cjs,mjs,json,ts,cjs,mts,jsx,tsx,sh}] | ||
charset = utf-8 | ||
indent_style = tab | ||
indent_size = 2 | ||
trim_trailing_whitespace = true | ||
|
||
[*.md] | ||
indent_style = space | ||
indent_size = 2 | ||
|
||
[package.json] | ||
indent_style = space | ||
indent_size = 2 |
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,4 @@ | ||
core.autocrlf=false | ||
|
||
* text=auto | ||
* text eol=lf |
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
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,11 @@ | ||
# To get started with Dependabot version updates, you'll need to specify which | ||
# package ecosystems to update and where the package manifests are located. | ||
# Please see the documentation for all configuration options: | ||
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates | ||
|
||
version: 2 | ||
updates: | ||
- package-ecosystem: "npm" # See documentation for possible values | ||
directory: "/" # Location of package manifests | ||
schedule: | ||
interval: "monthly" |
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
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,32 +1,45 @@ | ||
name: Node.js CI | ||
name: Tests | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
# The branches below must be a subset of the branches above | ||
branches: [ main ] | ||
merge_group: | ||
branches: [ main] | ||
|
||
defaults: | ||
run: | ||
working-directory: ./nominal | ||
working-directory: . | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
node-version: [14.x, 16.x, 18.x, 19.x] | ||
node-version: [ 18, 20 ] | ||
os: [ubuntu-22.04, ubuntu-20.04, windows-latest, macos-12, macos-11] | ||
|
||
runs-on: ${{ matrix.os }} | ||
|
||
env: | ||
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }} | ||
TURBO_TEAM: ${{ vars.TURBO_TEAM }} | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v2 | ||
- name: Checkout repository # v4.0.0 | ||
uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac | ||
- name: Install PNPM # v2.4.0 | ||
uses: pnpm/action-setup@d882d12c64e032187b2edb46d3a0d003b7a43598 | ||
with: | ||
version: '8.9.0' | ||
- name: Use Node.js ${{ matrix.node-version }} # v3.8.1 | ||
uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
- run: npm install -g yarn | ||
- run: yarn install | ||
- run: yarn test | ||
- run: yarn lint | ||
cache: 'pnpm' | ||
|
||
# All | ||
- name: (All) Install dependencies | ||
run: pnpm install --frozen-lockfile | ||
- name: (All) Run All Tasks | ||
run: pnpm turbo all |
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,5 +1,8 @@ | ||
# Dependencies, Caches & Artifacts | ||
.dccache | ||
# Caches & Artifacts | ||
.turbo/ | ||
coverage/ | ||
dist/ | ||
node_modules/ | ||
.eslintcache | ||
.turbo-build.log | ||
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,7 +1,6 @@ | ||
#!/bin/sh | ||
|
||
yarn clean:deno && \ | ||
yarn build:deno && \ | ||
git add ./nominal/deno && \ | ||
yarn lint && \ | ||
yarn test | ||
set -eu | ||
set -o pipefail | ||
|
||
pnpm turbo lint |
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,6 @@ | ||
#!/bin/sh | ||
|
||
set -eu | ||
set -o pipefail | ||
|
||
pnpm turbo all |
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 +1 @@ | ||
14.18.3 | ||
20.8.1 |
This file was deleted.
Oops, something went wrong.
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,6 +1,7 @@ | ||
{ | ||
"recommendations": [ | ||
"dbaeumer.vscode-eslint", | ||
"esbenp.prettier-vscode" | ||
] | ||
} | ||
"recommendations": [ | ||
"dbaeumer.vscode-eslint", | ||
"esbenp.prettier-vscode", | ||
"editorconfig.editorconfig" | ||
] | ||
} |
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,11 +1,10 @@ | ||
{ | ||
"files.autoSave": "afterDelay", | ||
"[javascript]": { | ||
"editor.defaultFormatter": "esbenp.prettier-vscode" | ||
}, | ||
"[typescript]": { | ||
"editor.defaultFormatter": "esbenp.prettier-vscode" | ||
}, | ||
"editor.formatOnSave": true, | ||
"editor.tabSize": 2, | ||
} | ||
"files.autoSave": "afterDelay", | ||
"[javascript]": { | ||
"editor.defaultFormatter": "esbenp.prettier-vscode" | ||
}, | ||
"[typescript]": { | ||
"editor.defaultFormatter": "esbenp.prettier-vscode" | ||
}, | ||
"editor.formatOnSave": true, | ||
} |
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 @@ | ||
'use strict'; | ||
|
||
module.exports = { | ||
root: true, | ||
env: { | ||
es2020: true, | ||
}, | ||
parser: '@typescript-eslint/parser', | ||
parserOptions: { | ||
ecmaVersion: 2020, | ||
sourceType: 'module', | ||
tsConfigRootDir: __dirname, | ||
project: ['./tsconfig.json'], | ||
}, | ||
extends: [ | ||
'@coderspirit', | ||
], | ||
ignorePatterns: [ | ||
'.eslintrc.cjs', | ||
'dist/**/*', | ||
'node_modules/**/*', | ||
] | ||
} |
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,3 @@ | ||
import config from '@coderspirit/eslint-config/prettier' | ||
|
||
export default config |
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,68 @@ | ||
{ | ||
"name": "@coderspirit/nominal-symbols", | ||
"version": "2.0.0", | ||
"description": "Symbol objects for @coderspirit/nominal", | ||
"keywords": [ | ||
"typescript", | ||
"types", | ||
"nominal", | ||
"taint" | ||
], | ||
"author": "Andres Correa Casablanca <[email protected]>", | ||
"private": false, | ||
"license": "MIT", | ||
"main": "./dist/symbols.cjs", | ||
"module": "./dist/symbols.mjs", | ||
"types": "./dist/symbols.d.cts", | ||
"files": [ | ||
"dist" | ||
], | ||
"exports": { | ||
"import": { | ||
"types": "./dist/symbols.d.mts", | ||
"default": "./dist/symbols.mjs" | ||
}, | ||
"require": { | ||
"types": "./dist/symbols.d.cts", | ||
"default": "./dist/symbols.cjs" | ||
} | ||
}, | ||
"scripts": { | ||
"build": "rollup --config rollup.config.prod.mjs", | ||
"build:clean": "rm -rf dist && rollup --config rollup.config.prod.mjs", | ||
"clean": "rm -rf dist", | ||
"lint:_all": "pnpm run lint:tsc && pnpm run lint:eslint && pnpm run lint:publint", | ||
"lint:eslint": "eslint . --ext ts,mts,tsx --report-unused-disable-directives --max-warnings 0", | ||
"lint:publint": "publint", | ||
"lint:tsc": "tsc", | ||
"prepublishOnly": "pnpm run clean && pnpm run build" | ||
}, | ||
"peerDependencies": { | ||
"typescript": ">=5.2" | ||
}, | ||
"devDependencies": { | ||
"@arethetypeswrong/cli": "^0.12.2", | ||
"@coderspirit/eslint-config": "^1.3.0", | ||
"@rollup/plugin-typescript": "^11.1.5", | ||
"@types/node": "^20.8.6", | ||
"@typescript-eslint/parser": "^6.7.5", | ||
"eslint": "^8.51.0", | ||
"prettier": "^3.0.3", | ||
"publint": "^0.2.4", | ||
"rollup": "^4.1.1", | ||
"rollup-plugin-dts": "^6.1.0", | ||
"tslib": "^2.6.2", | ||
"typescript": "^5.2.2" | ||
}, | ||
"engines": { | ||
"node": ">=18.0.0" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/Coder-Spirit/nominal.git" | ||
}, | ||
"bugs": { | ||
"url": "https://github.com/Coder-Spirit/nominal/issues" | ||
}, | ||
"homepage": "https://github.com/Coder-Spirit/nominal#readme" | ||
} |
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,24 @@ | ||
import { defineConfig } from 'rollup' | ||
import dts from 'rollup-plugin-dts' | ||
import pluginTs from '@rollup/plugin-typescript' | ||
|
||
const input = 'src/symbols.ts' | ||
|
||
export default defineConfig([ | ||
{ | ||
input, | ||
output: [ | ||
{ format: 'cjs', file: 'dist/symbols.cjs' }, | ||
{ format: 'es', file: 'dist/symbols.mjs' }, | ||
], | ||
plugins: [pluginTs()], | ||
}, | ||
{ | ||
input, | ||
output: [ | ||
{ format: 'cjs', file: 'dist/symbols.d.cts' }, | ||
{ format: 'es', file: 'dist/symbols.d.mts' }, | ||
], | ||
plugins: [dts()], | ||
}, | ||
]) |
File renamed without changes.
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,11 @@ | ||
{ | ||
"extends": "../../tsconfig.json", | ||
"compilerOptions": { | ||
"baseUrl": "./src", | ||
}, | ||
"exclude": [ | ||
"coverage/**/*", | ||
"dist/**/*", | ||
"node_modules/**/*", | ||
] | ||
} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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,11 @@ | ||
export const __BaseType: unique symbol = Symbol('__BaseType') | ||
export const __Properties: unique symbol = Symbol('__Properties') | ||
export const __Brand: unique symbol = Symbol('__Brand') | ||
|
||
export const __PropertyName: unique symbol = Symbol('__PropertyName') | ||
export const __PropertyValues: unique symbol = Symbol('__PropertyValues') | ||
|
||
// Some Nominal tricks rely on the fact that this symbol and its type won't be | ||
// exported as public to the library's users. | ||
const __ImpossibleSymbol: unique symbol = Symbol('__Impossible') | ||
export type __Impossible = typeof __ImpossibleSymbol |
Oops, something went wrong.