Merge branch 'terrastruct:master' into LSP-Fixes
This commit is contained in:
commit
f1760948b6
8 changed files with 58 additions and 18 deletions
|
|
@ -1,14 +1,5 @@
|
||||||
#### Features 🚀
|
#### Features 🚀
|
||||||
|
|
||||||
- Themes can be customized via `d2-config` vars. [#1777](https://github.com/terrastruct/d2/pull/1777)
|
|
||||||
- Icons can be added for special objects (sql_table, class, code, markdown, latex). [#1774](https://github.com/terrastruct/d2/pull/1774)
|
|
||||||
|
|
||||||
#### Improvements 🧹
|
#### Improvements 🧹
|
||||||
|
|
||||||
#### Bugfixes ⛑️
|
#### Bugfixes ⛑️
|
||||||
|
|
||||||
- Fix importing files that override an existing value with an array. [#1762](https://github.com/terrastruct/d2/pull/1762)
|
|
||||||
- Fixes missing unfilled triangle arrowheads when sketch flag is on. [#1763](https://github.com/terrastruct/d2/pull/1763)
|
|
||||||
- Fixes a bug where the render target could be incorrect if the target path contains "index". [#1764](https://github.com/terrastruct/d2/pull/1764)
|
|
||||||
- Fixes ELK layout with outside labels/icons. [#1776](https://github.com/terrastruct/d2/pull/1776)
|
|
||||||
- Fixes a bug where an edge could become disconnected with dagre layout and direction right. [#1778](https://github.com/terrastruct/d2/pull/1778)
|
|
||||||
|
|
|
||||||
23
ci/release/changelogs/v0.6.3.md
Normal file
23
ci/release/changelogs/v0.6.3.md
Normal file
|
|
@ -0,0 +1,23 @@
|
||||||
|
D2 0.6.3 allows you to make your own and customize existing D2 themes. Here's an example with some random color codes.
|
||||||
|
|
||||||
|
<img width="321" alt="Screen Shot 2023-12-16 at 3 13 04 PM" src="https://github.com/terrastruct/d2/assets/3120367/106fbb18-4650-44ac-bb66-359ef99dca3b" />
|
||||||
|
|
||||||
|
> See [docs](https://d2lang.com/tour/themes/#special-themes)
|
||||||
|
|
||||||
|
> [Playground link](https://play.d2lang.com/?script=rJLNjqM6EIX3fopS7joo4S8KVxqJBHiNkYVrwIpjW7aTTNTi3UcGDEn3SL2ZBQt_Ltepc4o7NbaADwLA4m2r5C_eTUcA1-MVt-qOxnCGNmCA076AzX9xfaiSeBNY7Fmen055ubDEszKr8vKwsNSzc1bvy2xhmWd1XtfH88Jyz5qmyY7VhsywLEeVXZUeyv1mgWPLNC6zJlvh2PO4O5fNcX0_qTdpmiT5UjrJN825qmY7A_HfQCS6hzKXyXmLQoBTDzQhCUsdCsHdaza2pxoLsE4ZZD8ZdTRcuKfA6HoTjmuBBThzw1lsSttQaa_cOTTkU3fY_ni9LsCiZP-wZpxAScElglbGURH83HgBH7OlHn_TTskhPPDeQBvVorVqzcQpQzv8Ekj7FFwyNN-nMbdf445eZvYW3oWjRVH3SiII1VkyEHKzYVHzBBqNVZIAPDhzfQH7ZBfqfNd519Hrmq_0gtBSIb5UvaUV-Zho6-eZBEdz1hl1wS2jti8g8VJUc7Bo7t-1YtxqQZ-f6r2xyQW3jkynsBtNO_z_r6EOJPzF0XtuvuUqQP4EAAD__w%3D%3D&layout=elk&theme=1&)
|
||||||
|
|
||||||
|
#### Features 🚀
|
||||||
|
|
||||||
|
- Themes can be customized via `d2-config` vars. [#1777](https://github.com/terrastruct/d2/pull/1777)
|
||||||
|
|
||||||
|
#### Improvements 🧹
|
||||||
|
|
||||||
|
- Icons can be added for special objects (sql_table, class, code, markdown, latex). [#1774](https://github.com/terrastruct/d2/pull/1774)
|
||||||
|
|
||||||
|
#### Bugfixes ⛑️
|
||||||
|
|
||||||
|
- Fix importing files that override an existing value with an array. [#1762](https://github.com/terrastruct/d2/pull/1762)
|
||||||
|
- Fixes missing unfilled triangle arrowheads when sketch flag is on. [#1763](https://github.com/terrastruct/d2/pull/1763)
|
||||||
|
- Fixes a bug where the render target could be incorrect if the target path contains "index". [#1764](https://github.com/terrastruct/d2/pull/1764)
|
||||||
|
- Fixes ELK layout with outside labels/icons. [#1776](https://github.com/terrastruct/d2/pull/1776)
|
||||||
|
- Fixes a bug where an edge could become disconnected with dagre layout and direction right. [#1778](https://github.com/terrastruct/d2/pull/1778)
|
||||||
26
e2etests-cli/concurrent_buf.go
Normal file
26
e2etests-cli/concurrent_buf.go
Normal file
|
|
@ -0,0 +1,26 @@
|
||||||
|
package e2etests_cli
|
||||||
|
|
||||||
|
import "sync"
|
||||||
|
|
||||||
|
// stderrWrapper lets stderr be read/write concurrently
|
||||||
|
type stderrWrapper struct {
|
||||||
|
msg string
|
||||||
|
m sync.Mutex
|
||||||
|
}
|
||||||
|
|
||||||
|
func (e *stderrWrapper) Write(p []byte) (n int, err error) {
|
||||||
|
e.m.Lock()
|
||||||
|
defer e.m.Unlock()
|
||||||
|
e.msg += string(p)
|
||||||
|
return len(p), nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (e *stderrWrapper) Reset() {
|
||||||
|
e.msg = ""
|
||||||
|
}
|
||||||
|
|
||||||
|
func (e *stderrWrapper) Read() string {
|
||||||
|
e.m.Lock()
|
||||||
|
defer e.m.Unlock()
|
||||||
|
return e.msg
|
||||||
|
}
|
||||||
|
|
@ -881,7 +881,7 @@ layers: {
|
||||||
c -> b
|
c -> b
|
||||||
}
|
}
|
||||||
}`)
|
}`)
|
||||||
stderr := &bytes.Buffer{}
|
stderr := &stderrWrapper{}
|
||||||
tms := testMain(dir, env, "--watch", "--browser=0", "index.d2")
|
tms := testMain(dir, env, "--watch", "--browser=0", "index.d2")
|
||||||
tms.Stderr = stderr
|
tms.Stderr = stderr
|
||||||
|
|
||||||
|
|
@ -935,7 +935,7 @@ layers: {
|
||||||
c -> b
|
c -> b
|
||||||
}
|
}
|
||||||
}`)
|
}`)
|
||||||
stderr := &bytes.Buffer{}
|
stderr := &stderrWrapper{}
|
||||||
tms := testMain(dir, env, "--watch", "--browser=0", "index.d2")
|
tms := testMain(dir, env, "--watch", "--browser=0", "index.d2")
|
||||||
tms.Stderr = stderr
|
tms.Stderr = stderr
|
||||||
|
|
||||||
|
|
@ -988,7 +988,7 @@ layers: {
|
||||||
c -> b
|
c -> b
|
||||||
}
|
}
|
||||||
}`)
|
}`)
|
||||||
stderr := &bytes.Buffer{}
|
stderr := &stderrWrapper{}
|
||||||
tms := testMain(dir, env, "--watch", "--browser=0", "index.d2")
|
tms := testMain(dir, env, "--watch", "--browser=0", "index.d2")
|
||||||
tms.Stderr = stderr
|
tms.Stderr = stderr
|
||||||
|
|
||||||
|
|
@ -1036,7 +1036,7 @@ layers: {
|
||||||
writeFile(t, dir, "b.d2", `
|
writeFile(t, dir, "b.d2", `
|
||||||
x
|
x
|
||||||
`)
|
`)
|
||||||
stderr := &bytes.Buffer{}
|
stderr := &stderrWrapper{}
|
||||||
tms := testMain(dir, env, "--watch", "--browser=0", "a.d2")
|
tms := testMain(dir, env, "--watch", "--browser=0", "a.d2")
|
||||||
tms.Stderr = stderr
|
tms.Stderr = stderr
|
||||||
|
|
||||||
|
|
@ -1202,26 +1202,26 @@ func getNumBoards(svg string) int {
|
||||||
|
|
||||||
var errRE = regexp.MustCompile(`err:`)
|
var errRE = regexp.MustCompile(`err:`)
|
||||||
|
|
||||||
func waitLogs(ctx context.Context, buf *bytes.Buffer, pattern *regexp.Regexp) (string, error) {
|
func waitLogs(ctx context.Context, stream *stderrWrapper, pattern *regexp.Regexp) (string, error) {
|
||||||
ticker := time.NewTicker(10 * time.Millisecond)
|
ticker := time.NewTicker(10 * time.Millisecond)
|
||||||
defer ticker.Stop()
|
defer ticker.Stop()
|
||||||
var match string
|
var match string
|
||||||
for i := 0; i < 1000 && match == ""; i++ {
|
for i := 0; i < 1000 && match == ""; i++ {
|
||||||
select {
|
select {
|
||||||
case <-ticker.C:
|
case <-ticker.C:
|
||||||
out := buf.String()
|
out := stream.Read()
|
||||||
match = pattern.FindString(out)
|
match = pattern.FindString(out)
|
||||||
errMatch := errRE.FindString(out)
|
errMatch := errRE.FindString(out)
|
||||||
if errMatch != "" {
|
if errMatch != "" {
|
||||||
return "", errors.New(buf.String())
|
return "", errors.New(out)
|
||||||
}
|
}
|
||||||
case <-ctx.Done():
|
case <-ctx.Done():
|
||||||
ticker.Stop()
|
ticker.Stop()
|
||||||
return "", fmt.Errorf("could not match pattern in log. logs: %s", buf.String())
|
return "", fmt.Errorf("could not match pattern in log. logs: %s", stream.Read())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if match == "" {
|
if match == "" {
|
||||||
return "", errors.New(buf.String())
|
return "", errors.New(stream.Read())
|
||||||
}
|
}
|
||||||
|
|
||||||
return match, nil
|
return match, nil
|
||||||
|
|
|
||||||
Binary file not shown.
BIN
e2etests-cli/testdata/TestCLI_E2E/no-nav-pdf.exp.pdf
vendored
BIN
e2etests-cli/testdata/TestCLI_E2E/no-nav-pdf.exp.pdf
vendored
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in a new issue