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

Commit

Permalink
Upgrade dependencies (#399)
Browse files Browse the repository at this point in the history
  • Loading branch information
IMax153 authored Jul 9, 2023
1 parent 53eae35 commit 1c04369
Show file tree
Hide file tree
Showing 42 changed files with 1,772 additions and 2,193 deletions.
6 changes: 6 additions & 0 deletions .changeset/hip-clocks-cough.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@effect/printer-ansi": minor
"@effect/printer": minor
---

upgrade to @effect/data@0.13.5, @effect/io@0.31.3, and add @effect/typeclass@0.1.0
4 changes: 2 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:

strategy:
matrix:
node-version: [16.17.1]
node-version: [18.16.1]

steps:
- uses: actions/checkout@v3
Expand All @@ -27,7 +27,7 @@ jobs:
name: Install pnpm
id: pnpm-install
with:
version: 7
version: 8
run_install: false
- name: Get pnpm store directory
id: pnpm-cache
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: PR Flow
on:
pull_request:
branches:
- 'main'
- "main"

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
Expand All @@ -14,7 +14,7 @@ jobs:

strategy:
matrix:
node-version: [16.17.1]
node-version: [18.16.1]

steps:
- uses: actions/checkout@v3
Expand All @@ -28,7 +28,7 @@ jobs:
name: Install pnpm
id: pnpm-install
with:
version: 7
version: 8
run_install: false
- name: Get pnpm store directory
id: pnpm-cache
Expand Down
4 changes: 2 additions & 2 deletions docs/printer/Doc.ts.md
Original file line number Diff line number Diff line change
Expand Up @@ -2579,7 +2579,7 @@ be broken into multiple lines.
**Signature**

```ts
export declare const reflow: (s: string, char?: string | undefined) => Doc<never>
export declare const reflow: (s: string, char?: string) => Doc<never>
```

**Example**
Expand Down Expand Up @@ -2702,7 +2702,7 @@ specified `char` to split on (defaults to `" "`).
**Signature**

```ts
export declare const words: (s: string, char?: string | undefined) => ReadonlyArray<Doc<never>>
export declare const words: (s: string, char?: string) => ReadonlyArray<Doc<never>>
```

**Example**
Expand Down
4 changes: 2 additions & 2 deletions docs/printer/DocTree.ts.md
Original file line number Diff line number Diff line change
Expand Up @@ -473,7 +473,7 @@ import * as Doc from '@effect/printer/Doc'
import * as DocTree from '@effect/printer/DocTree'
import * as Layout from '@effect/printer/Layout'
import { identity, pipe } from '@effect/data/Function'
import * as String from '@effect/data/String'
import * as Monoid from '@effect/typeclass/Monoid'

const doc: Doc.Doc<void> = Doc.hsep([
Doc.text('hello'),
Expand All @@ -484,7 +484,7 @@ const tree = DocTree.treeForm(Layout.pretty(Layout.defaultOptions)(doc))

const rendered = pipe(
tree,
DocTree.renderSimplyDecorated(String.Monoid, identity, (_, x) => `>>>${x}<<<`)
DocTree.renderSimplyDecorated(Monoid.string, identity, (_, x) => `>>>${x}<<<`)
)

assert.strictEqual(rendered, 'hello >>>world<<<!')
Expand Down
4 changes: 2 additions & 2 deletions docs/printer/Layout.ts.md
Original file line number Diff line number Diff line change
Expand Up @@ -151,14 +151,14 @@ import type * as DocStream from '@effect/printer/DocStream'
import * as Layout from '@effect/printer/Layout'
import * as PageWidth from '@effect/printer/PageWidth'
import * as Render from '@effect/printer/Render'
import { flow, pipe } from '@effect/data/Function'
import { pipe } from '@effect/data/Function'
import * as String from '@effect/data/String'

// Consider the following python-ish document:
const fun = <A>(doc: Doc.Doc<A>): Doc.Doc<A> =>
Doc.hcat([pipe(Doc.hcat([Doc.text('fun('), Doc.softLineBreak, doc]), Doc.hang(2)), Doc.text(')')])

const funs = flow(fun, fun, fun, fun, fun)
const funs = <A>(doc: Doc.Doc<A>): Doc.Doc<A> => pipe(doc, fun, fun, fun, fun, fun)

const doc = funs(Doc.align(Doc.list(Doc.words('abcdef ghijklm'))))

Expand Down
40 changes: 37 additions & 3 deletions flake.lock

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

43 changes: 17 additions & 26 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,39 +3,30 @@
nixpkgs = {
url = "github:nixos/nixpkgs/nixpkgs-unstable";
};

flake-utils = {
url = "github:numtide/flake-utils";
};
};

outputs = {
self,
nixpkgs,
flake-utils,
...
}: 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;
}:
flake-utils.lib.eachDefaultSystem (system: let
pkgs = nixpkgs.legacyPackages.${system};
in {
default = pkgs.mkShell {
buildInputs = with pkgs; [
nodejs-16_x
nodePackages.pnpm
];
formatter = pkgs.alejandra;

devShells = {
default = pkgs.mkShell {
buildInputs = with pkgs; [
nodejs-18_x
nodePackages.pnpm
];
};
};
});
};
}
58 changes: 23 additions & 35 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,64 +14,52 @@
"clean": "ultra -r clean && rimraf tsconfig.tsbuildinfo",
"build": "pnpm build-all && ultra -r -b build-pack",
"build-all": "tsc -b tsconfig.build.json",
"build-watch": "tsc -b tsconfig.json --watch",
"build-watch": "tsc -b tsconfig.build.json --watch",
"circular": "madge --ts-config ./tsconfig.madge.json --circular --no-color --no-spinner --warning packages/*/build/esm",
"docs": "ultra -r docs && pnpm docs-cp",
"docs-cp": "node scripts/docs-cp.js",
"test": "vitest",
"autofix": "ultra -r autofix",
"docs": "ultra -r docs && pnpm docs-cp",
"docs-cp": "node scripts/docs-cp.js",
"lint": "ultra -r lint",
"tc": "ultra -r tc",
"version": "changeset version && pnpm install --no-frozen-lockfile"
},
"devDependencies": {
"@babel/cli": "^7.21.5",
"@babel/core": "^7.21.8",
"@babel/plugin-transform-modules-commonjs": "^7.21.5",
"@babel/cli": "^7.22.6",
"@babel/core": "^7.22.8",
"@babel/plugin-transform-modules-commonjs": "^7.22.5",
"@changesets/changelog-github": "^0.4.8",
"@changesets/cli": "^2.26.1",
"@changesets/cli": "^2.26.2",
"@effect-ts/build-utils": "0.40.7",
"@effect-ts/core": "^0.60.5",
"@effect/babel-plugin": "^0.2.0",
"@effect/language-service": "^0.0.19",
"@effect/printer": "workspace:^",
"@effect/printer-ansi": "workspace:^",
"@effect/docgen": "^0.1.2",
"@effect/language-service": "0.0.19",
"@repo-tooling/eslint-plugin-dprint": "^0.0.4",
"@rollup/pluginutils": "^5.0.2",
"@types/benchmark": "^2.1.2",
"@types/chai": "^4.3.5",
"@types/glob": "^8.1.0",
"@types/jest": "^29.5.1",
"@types/node": "^20.1.4",
"@types/prettier": "2.7.2",
"@typescript-eslint/eslint-plugin": "^5.59.5",
"@typescript-eslint/parser": "^5.59.5",
"@vitejs/plugin-react": "^4.0.0",
"@vitest/coverage-c8": "^0.31.0",
"@types/node": "^20.4.1",
"@typescript-eslint/eslint-plugin": "^5.61.0",
"@typescript-eslint/parser": "^5.61.0",
"@vitejs/plugin-react": "^4.0.2",
"@vitest/coverage-v8": "^0.33.0",
"@vitest/expect": "^0.33.0",
"babel-plugin-annotate-pure-calls": "^0.4.0",
"concurrently": "^8.0.1",
"cpx": "^1.5.0",
"docs-ts": "0.8.0",
"error-stack-parser": "^2.1.4",
"eslint": "^8.40.0",
"concurrently": "^8.2.0",
"eslint": "^8.44.0",
"eslint-import-resolver-typescript": "^3.5.5",
"eslint-plugin-codegen": "0.17.0",
"eslint-plugin-deprecation": "^1.4.1",
"eslint-plugin-import": "^2.27.5",
"eslint-plugin-simple-import-sort": "^10.0.0",
"eslint-plugin-sort-destructure-keys": "^1.5.0",
"fast-check": "^3.8.1",
"glob": "^10.2.3",
"madge": "^6.0.0",
"picocolors": "^1.0.0",
"prettier": "^2.8.8",
"rimraf": "^5.0.0",
"stackframe": "^1.3.4",
"ts-codemod": "^4.0.4",
"fast-check": "^3.11.0",
"madge": "^6.1.0",
"rimraf": "^5.0.1",
"ts-node": "^10.9.1",
"typescript": "^5.0.4",
"typescript": "^5.1.6",
"ultra-runner": "^3.10.5",
"vite": "^4.3.5",
"vitest": "0.31.0"
"vite": "^4.4.2",
"vitest": "0.33.0"
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"exclude": ["src/internal_effect_untraced/**/*.ts"],
"exclude": ["src/internal/**/*.ts"],
"theme": "mikearnaldi/just-the-docs",
"parseCompilerOptions": {
"strict": true,
Expand Down
17 changes: 8 additions & 9 deletions packages/printer-ansi/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,22 +28,20 @@
],
"scripts": {
"example": "ts-node --project tsconfig.examples.json",
"version": "changeset version && pnpm install --no-frozen-lockfile",
"version": "changeset version && pnpm install --no-frozen-lockfile && pnpm run docs-update",
"release": "pnpm run build && changeset publish",
"clean": "rimraf build tsbuildinfo dist .ultra.cache.json .cache",
"clean": "rimraf build dist",
"build": "pnpm build-all && pnpm build-pack",
"build-cjs": "babel build/esm --config-file ../../.babel.cjs.json --out-dir build/cjs --out-file-extension .js --source-maps",
"build-mjs": "babel build/esm --config-file ../../.babel.mjs.json --out-dir build/mjs --out-file-extension .mjs --source-maps",
"build-post": "build-utils pack-v4",
"build-pack": "concurrently \"pnpm build-cjs\" \"pnpm build-mjs\" && pnpm build-post",
"build-all": "tsc -b tsconfig.json",
"build-watch": "tsc -b tsconfig.json --watch",
"circular": "madge --ts-config ./tsconfig.madge.json --circular --no-color --no-spinner --warning build/esm",
"docs": "docgen",
"lint": "eslint --ext .ts,.tsx src/**/* test/**/*",
"autofix": "pnpm lint --fix",
"tc": "tsc --noEmit",
"docs": "docs-ts",
"docs-update": "git add --force --all docs/modules || true",
"circular": "madge --ts-config ./tsconfig.madge.json --circular --no-color --no-spinner --warning build/esm",
"test": "vitest",
"coverage": "vitest run --coverage"
},
Expand All @@ -56,9 +54,10 @@
}
},
"dependencies": {
"@effect/data": "^0.12.2",
"@effect/io": "^0.25.9",
"@effect/printer": "*"
"@effect/data": "~0.13.5",
"@effect/io": "~0.31.3",
"@effect/printer": "workspace:^",
"@effect/typeclass": "~0.1.0"
},
"config": {
"side": [],
Expand Down
2 changes: 1 addition & 1 deletion packages/printer-ansi/src/AnsiRender.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

import type { AnsiDoc } from "@effect/printer-ansi/AnsiDoc"
import type { AnsiStyle } from "@effect/printer-ansi/AnsiStyle"
import * as internal from "@effect/printer-ansi/internal_effect_untraced/ansiRender"
import * as internal from "@effect/printer-ansi/internal/ansiRender"
import type { Doc } from "@effect/printer/Doc"
import type { DocStream } from "@effect/printer/DocStream"
import type { AvailablePerLine } from "@effect/printer/PageWidth"
Expand Down
6 changes: 3 additions & 3 deletions packages/printer-ansi/src/AnsiStyle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
*/

import type { Option } from "@effect/data/Option"
import type * as monoid from "@effect/data/typeclass/Monoid"
import type * as semigroup from "@effect/data/typeclass/Semigroup"
import type { Color } from "@effect/printer-ansi/Color"
import * as internal from "@effect/printer-ansi/internal_effect_untraced/ansiStyle"
import * as internal from "@effect/printer-ansi/internal/ansiStyle"
import type { SGR } from "@effect/printer-ansi/SGR"
import type * as monoid from "@effect/typeclass/Monoid"
import type * as semigroup from "@effect/typeclass/Semigroup"

// -----------------------------------------------------------------------------
// Models
Expand Down
2 changes: 1 addition & 1 deletion packages/printer-ansi/src/Color.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* @since 1.0.0
*/

import * as internal from "@effect/printer-ansi/internal_effect_untraced/color"
import * as internal from "@effect/printer-ansi/internal/color"

// -----------------------------------------------------------------------------
// Models
Expand Down
2 changes: 1 addition & 1 deletion packages/printer-ansi/src/RenderLayer.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* @since 1.0.0
*/
import * as internal from "@effect/printer-ansi/internal_effect_untraced/renderLayer"
import * as internal from "@effect/printer-ansi/internal/renderLayer"

// -----------------------------------------------------------------------------
// Models
Expand Down
Loading

0 comments on commit 1c04369

Please sign in to comment.