Skip to content
This repository has been archived by the owner on Jul 16, 2024. It is now read-only.

Commit

Permalink
upgrade to latest @effect packages
Browse files Browse the repository at this point in the history
  • Loading branch information
IMax153 committed Mar 6, 2023
1 parent 95b574b commit 1ab771a
Show file tree
Hide file tree
Showing 108 changed files with 7,906 additions and 7,141 deletions.
7 changes: 7 additions & 0 deletions .babel.cjs.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"plugins": [
["@effect/babel-plugin"],
["@babel/transform-modules-commonjs"],
["annotate-pure-calls"]
]
}
3 changes: 3 additions & 0 deletions .babel.mjs.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"plugins": [["@effect/babel-plugin"], ["annotate-pure-calls"]]
}
9 changes: 2 additions & 7 deletions .changeset/config.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
{
"$schema": "https://unpkg.com/@changesets/config@2.0.0/schema.json",
"changelog": [
"@changesets/changelog-github",
{
"repo": "Effect-TS/printer"
}
],
"$schema": "https://unpkg.com/@changesets/config@2.3.0/schema.json",
"changelog": ["@changesets/changelog-github", { "repo": "Effect-TS/printer" }],
"commit": false,
"linked": [],
"access": "restricted",
Expand Down
6 changes: 6 additions & 0 deletions .changeset/two-ducks-yawn.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@effect/printer-ansi": minor
"@effect/printer": minor
---

upgrade to latest @effect packages
9 changes: 0 additions & 9 deletions .editorconfig

This file was deleted.

1 change: 1 addition & 0 deletions .envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
use flake;
74 changes: 40 additions & 34 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* eslint-disable no-undef */
module.exports = {
ignorePatterns: ["build", "dist"],
ignorePatterns: ["build", "dist", "*.mjs", "docs", "*.md"],
parser: "@typescript-eslint/parser",
parserOptions: {
ecmaVersion: 2018,
Expand All @@ -22,52 +22,58 @@ module.exports = {
"plugin:@typescript-eslint/recommended",
"plugin:@repo-tooling/dprint/recommended"
],
plugins: ["import", "sort-destructure-keys", "simple-import-sort"],
plugins: ["deprecation", "import", "sort-destructure-keys", "simple-import-sort", "codegen"],
rules: {
"@repo-tooling/dprint/dprint": [
"error",
{
config: {
// The TypeScript configuration of dprint
// See also https://dprint.dev/plugins/typescript/config/,
"indentWidth": 2,
"semiColons": "asi",
"quoteStyle": "alwaysDouble",
"trailingCommas": "never",
"operatorPosition": "maintain",
"useParentheses": "preferNone"
}
}
],
"no-restricted-imports": ["error", {
"patterns": [".*"]
}],
"codegen/codegen": "error",
"no-fallthrough": "off",
"no-irregular-whitespace": "off",
"object-shorthand": "error",
"prefer-destructuring": "off",
"sort-imports": "off",
"@typescript-eslint/ban-ts-comment": "off",
"no-unused-vars": "off",
"prefer-rest-params": "off",
"prefer-spread": "off",
"import/first": "error",
"import/no-cycle": "error",
"import/newline-after-import": "error",
"import/no-duplicates": "error",
"import/no-unresolved": "off",
"import/order": "off",
"simple-import-sort/imports": "off",
"sort-destructure-keys/sort-destructure-keys": "error",
"deprecation/deprecation": "off",
"@typescript-eslint/array-type": ["warn", { "default": "generic", "readonly": "generic" }],
"@typescript-eslint/member-delimiter-style": 0,
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/ban-types": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-empty-interface": "off",
"@typescript-eslint/consistent-type-imports": "warn",
"@typescript-eslint/no-unused-vars": ["error", {
"argsIgnorePattern": "^_",
"varsIgnorePattern": "^_"
}],
"@typescript-eslint/ban-ts-comment": "off",
"@typescript-eslint/camelcase": "off",
"@typescript-eslint/consistent-type-imports": "error",
"@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/explicit-module-boundary-types": "off",
"@typescript-eslint/interface-name-prefix": "off",
"@typescript-eslint/no-empty-interface": "off",
"@typescript-eslint/no-array-constructor": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-unused-vars": "off",
"@typescript-eslint/no-use-before-define": "off",
"@typescript-eslint/no-namespace": "off",
"@typescript-eslint/no-non-null-assertion": "off",
"import/first": "error",
"import/no-cycle": "error",
"import/newline-after-import": "error",
"import/no-duplicates": "error",
"import/no-unresolved": "off",
"import/order": "off",
"simple-import-sort/imports": "error",
"sort-destructure-keys/sort-destructure-keys": "error"
"@repo-tooling/dprint/dprint": [
"error",
{
config: {
"indentWidth": 2,
"lineWidth": 120,
"semiColons": "asi",
"quoteStyle": "alwaysDouble",
"trailingCommas": "never",
"operatorPosition": "maintain",
"arrowFunction.useParentheses": "force"
}
}
]
}
}
16 changes: 9 additions & 7 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,17 @@ jobs:
restore-keys: |
${{ runner.os }}-pnpm-store-
- run: pnpm install
- run: pnpm build
- run: pnpm test
- name: Create Version PR or Publish to NPM
if: github.repository == 'Effect-TS/printer'
- run: pnpm run build
- run: pnpm run circular
- run: pnpm run test
- run: pnpm run lint
- run: pnpm run docs
- name: Create Release Pull Request or Publish
id: changesets
uses: changesets/action@v1
with:
version: node .github/changeset-version.cjs
publish: pnpm release
version: pnpm run version
publish: pnpm exec changeset publish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.EFFECT_BOT_NPM }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
coverage/
*.tsbuildinfo
node_modules/
yarn-error.log
.ultra.cache.json
.DS_Store
tmp/
build/
dist/
.cache/
.direnv/
2 changes: 1 addition & 1 deletion .gitpod.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
tasks:
- init: pnpm install && pnpm build
- init: npm install -g pnpm && pnpm install && pnpm build
github:
prebuilds:
addCheck: true
Expand Down
8 changes: 4 additions & 4 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
{
"label": "clean",
"type": "shell",
"command": "pnpm clean",
"command": "direnv exec . pnpm clean",
"isBackground": false,
"problemMatcher": []
},
{
"label": "build-watch",
"type": "shell",
"command": "pnpm build-watch",
"command": "direnv exec . pnpm build-watch",
"problemMatcher": [
"$tsc-watch"
],
Expand All @@ -27,7 +27,7 @@
{
"label": "build",
"type": "shell",
"command": "pnpm build",
"command": "direnv exec . pnpm build",
"problemMatcher": [],
"isBackground": false
},
Expand All @@ -37,7 +37,7 @@
"build-watch"
],
"type": "shell",
"command": "pnpm test",
"command": "direnv exec . pnpm test",
"problemMatcher": []
}
]
Expand Down
26 changes: 17 additions & 9 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,21 @@
Copyright (c) 2019 Michael Arnaldi.
MIT License

Copyright (c) 2020 Matechs Garage Ltd.
Copyright (c) 2020-present The Contributors

Copyright (c) 2020 Matechs Holdings Ltd.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

Copyright (c) 2020 The Contributors.
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
27 changes: 27 additions & 0 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

41 changes: 41 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{
inputs = {
nixpkgs = {
url = "github:nixos/nixpkgs/nixpkgs-unstable";
};
};

outputs = {
self,
nixpkgs,
...
}: let
# Helper generating outputs for each desired system
forAllSystems = nixpkgs.lib.genAttrs [
"x86_64-darwin"
"x86_64-linux"
"aarch64-darwin"
"aarch64-linux"
];

pkgsFor = system: nixpkgs.legacyPackages.${system};
in {
formatter = forAllSystems (
system: let
pkgs = pkgsFor system;
in
pkgs.alejandra
);

devShells = forAllSystems (system: let
pkgs = pkgsFor system;
in {
default = pkgs.mkShell {
buildInputs = with pkgs; [
nodejs-16_x
nodePackages.pnpm
];
};
});
};
}
Loading

0 comments on commit 1ab771a

Please sign in to comment.