Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: goadesign/model
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v1.9.4
Choose a base ref
...
head repository: goadesign/model
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v1.9.5
Choose a head ref
  • 11 commits
  • 13 files changed
  • 2 contributors

Commits on May 7, 2024

  1. build(deps): bump golang.org/x/tools from 0.20.0 to 0.21.0 (#702)

    Bumps [golang.org/x/tools](https://github.com/golang/tools) from 0.20.0 to 0.21.0.
    - [Release notes](https://github.com/golang/tools/releases)
    - [Commits](golang/tools@v0.20.0...v0.21.0)
    
    ---
    updated-dependencies:
    - dependency-name: golang.org/x/tools
      dependency-type: direct:production
      update-type: version-update:semver-minor
    ...
    
    Signed-off-by: dependabot[bot] <[email protected]>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored May 7, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    15e4c94 View commit details
  2. build(deps-dev): bump @pmmmwh/react-refresh-webpack-plugin (#700)

    Bumps [@pmmmwh/react-refresh-webpack-plugin](https://github.com/pmmmwh/react-refresh-webpack-plugin) from 0.5.11 to 0.5.13.
    - [Release notes](https://github.com/pmmmwh/react-refresh-webpack-plugin/releases)
    - [Changelog](https://github.com/pmmmwh/react-refresh-webpack-plugin/blob/main/CHANGELOG.md)
    - [Commits](pmmmwh/react-refresh-webpack-plugin@v0.5.11...v0.5.13)
    
    ---
    updated-dependencies:
    - dependency-name: "@pmmmwh/react-refresh-webpack-plugin"
      dependency-type: direct:development
      update-type: version-update:semver-patch
    ...
    
    Signed-off-by: dependabot[bot] <[email protected]>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored May 7, 2024
    Copy the full SHA
    d13433e View commit details
  3. build(deps): bump styled-components in /cmd/mdl/webapp (#697)

    Bumps [styled-components](https://github.com/styled-components/styled-components) from 6.1.8 to 6.1.9.
    - [Release notes](https://github.com/styled-components/styled-components/releases)
    - [Commits](styled-components/styled-components@v6.1.8...v6.1.9)
    
    ---
    updated-dependencies:
    - dependency-name: styled-components
      dependency-type: direct:production
      update-type: version-update:semver-patch
    ...
    
    Signed-off-by: dependabot[bot] <[email protected]>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored May 7, 2024
    Copy the full SHA
    a62e4a2 View commit details
  4. build(deps-dev): bump @babel/core in /cmd/mdl/webapp (#698)

    Bumps [@babel/core](https://github.com/babel/babel/tree/HEAD/packages/babel-core) from 7.24.4 to 7.24.5.
    - [Release notes](https://github.com/babel/babel/releases)
    - [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
    - [Commits](https://github.com/babel/babel/commits/v7.24.5/packages/babel-core)
    
    ---
    updated-dependencies:
    - dependency-name: "@babel/core"
      dependency-type: direct:development
      update-type: version-update:semver-patch
    ...
    
    Signed-off-by: dependabot[bot] <[email protected]>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored May 7, 2024
    Copy the full SHA
    ebaf66f View commit details

Commits on May 8, 2024

  1. build(deps-dev): bump @babel/preset-env in /cmd/mdl/webapp (#699)

    Bumps [@babel/preset-env](https://github.com/babel/babel/tree/HEAD/packages/babel-preset-env) from 7.24.4 to 7.24.5.
    - [Release notes](https://github.com/babel/babel/releases)
    - [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
    - [Commits](https://github.com/babel/babel/commits/v7.24.5/packages/babel-preset-env)
    
    ---
    updated-dependencies:
    - dependency-name: "@babel/preset-env"
      dependency-type: direct:development
      update-type: version-update:semver-patch
    ...
    
    Signed-off-by: dependabot[bot] <[email protected]>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored May 8, 2024
    Copy the full SHA
    a8aa4ae View commit details

Commits on May 9, 2024

  1. Add External tag to external systems (#703)

    This makes it more convenient to style them.
    raphael authored May 9, 2024
    Copy the full SHA
    3e23f9d View commit details
  2. Allow override JS bundle path for development (#704)

    * Allow override JS bundle path for development
    
    * Make linter happy
    raphael authored May 9, 2024
    Copy the full SHA
    5db21dc View commit details
  3. build(deps): bump react-dom and @types/react-dom in /cmd/mdl/webapp (#…

    …701)
    
    Bumps [react-dom](https://github.com/facebook/react/tree/HEAD/packages/react-dom) and [@types/react-dom](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/react-dom). These dependencies needed to be updated together.
    
    Updates `react-dom` from 18.2.0 to 18.3.1
    - [Release notes](https://github.com/facebook/react/releases)
    - [Changelog](https://github.com/facebook/react/blob/main/CHANGELOG.md)
    - [Commits](https://github.com/facebook/react/commits/v18.3.1/packages/react-dom)
    
    Updates `@types/react-dom` from 18.2.25 to 18.3.0
    - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
    - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/react-dom)
    
    ---
    updated-dependencies:
    - dependency-name: react-dom
      dependency-type: direct:production
      update-type: version-update:semver-minor
    - dependency-name: "@types/react-dom"
      dependency-type: direct:development
      update-type: version-update:semver-minor
    ...
    
    Signed-off-by: dependabot[bot] <[email protected]>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored May 9, 2024
    Copy the full SHA
    74b177f View commit details
  4. Update dependencies (#705)

    * Update dependencies
    
    * Upgrade go.mod syntax to Go 1.22+
    
    The go.mod directive now needs to define the build number. This was not
    the case in previous version of Go. Upgrade to Go 1.22 in both go.mod
    and in the CI flow to accomodate for this change. This does mean that future
    versions of model require Go 1.22+
    raphael authored May 9, 2024
    Copy the full SHA
    72de23f View commit details
  5. Prepare v1.9.5

    raphael committed May 9, 2024
    Copy the full SHA
    1bdd349 View commit details
  6. Release v1.9.5

    raphael committed May 9, 2024
    Copy the full SHA
    89c7ad9 View commit details
Showing with 494 additions and 470 deletions.
  1. +2 −2 .github/workflows/test.yml
  2. +1 −1 DSL.md
  3. +1 −1 Makefile
  4. +5 −5 README.md
  5. +7 −3 cmd/mdl/main.go
  6. +4 −4 cmd/mdl/serve.go
  7. +286 −290 cmd/mdl/webapp/package-lock.json
  8. +6 −6 cmd/mdl/webapp/package.json
  9. +159 −136 cmd/mdl/webapp/yarn.lock
  10. +4 −1 expr/system.go
  11. +8 −8 go.mod
  12. +10 −12 go.sum
  13. +1 −1 pkg/version.go
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -13,7 +13,7 @@ jobs:
strategy:
fail-fast: true
matrix:
go: ['1.20', '1.21']
go: ['1.22']
os: ['ubuntu-latest', 'windows-latest']
runs-on: ${{ matrix.os }}

@@ -31,7 +31,7 @@ jobs:
run: make ci

- name: Upload test coverage for deep source
if: matrix.go == '1.21' && matrix.os == 'ubuntu-latest'
if: matrix.go == '1.22' && matrix.os == 'ubuntu-latest'
uses: actions/upload-artifact@v4
with:
name: coverage
2 changes: 1 addition & 1 deletion DSL.md
Original file line number Diff line number Diff line change
@@ -3,7 +3,7 @@

The code snippet below describes the entire syntax of the DSL. The complete
reference can be found in the `dsl`
[package documentation](https://pkg.go.dev/goa.design/model@v1.9.4/dsl?tab=doc)
[package documentation](https://pkg.go.dev/goa.design/model@v1.9.5/dsl?tab=doc)

```Go
// Design defines the architecture design containing the models and views.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -14,7 +14,7 @@
#
MAJOR=1
MINOR=9
BUILD=4
BUILD=5

GO_FILES=$(shell find . -type f -name '*.go')

10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -212,13 +212,13 @@ in this repo.

### Using Model as a library

The [mdl](https://pkg.go.dev/goa.design/model@v1.9.4/mdl?tab=doc) package
[RunDSL](https://pkg.go.dev/goa.design/model@v1.9.4/mdl?tab=doc#RunDSL)
The [mdl](https://pkg.go.dev/goa.design/model@v1.9.5/mdl?tab=doc) package
[RunDSL](https://pkg.go.dev/goa.design/model@v1.9.5/mdl?tab=doc#RunDSL)
method runs the DSL and produces data structures that contain all the
information needed to render the views it defines.

The [stz](https://pkg.go.dev/goa.design/model@v1.9.4/stz?tab=doc) package
[RunDSL](https://pkg.go.dev/goa.design/model@v1.9.4/stz?tab=doc#RunDSL)
The [stz](https://pkg.go.dev/goa.design/model@v1.9.5/stz?tab=doc) package
[RunDSL](https://pkg.go.dev/goa.design/model@v1.9.5/stz?tab=doc#RunDSL)
method runs the DSL and produces a data structure that can be serialized into
JSON and uploaded to the [Structurizr service](https://structurizr.com).

@@ -347,7 +347,7 @@ view that is scoped to a parent element.
### Resources

The DSL package
[documentation](https://pkg.go.dev/goa.design/model@v1.9.4/dsl?tab=doc) lists
[documentation](https://pkg.go.dev/goa.design/model@v1.9.5/dsl?tab=doc) lists
all the DSL keywords and their usage.

The file [DSL.md](https://github.com/goadesign/model/blob/master/DSL.md)
10 changes: 7 additions & 3 deletions cmd/mdl/main.go
Original file line number Diff line number Diff line change
@@ -28,6 +28,7 @@ func main() {
port = svrset.Int("port", 8080, "set local HTTP port used to serve diagram editor")

devmode = os.Getenv("DEVMODE") == "1"
devdist = os.Getenv("DEVDIST")

showUsage = func() { printUsage(svrset, genset, gset) }
)
@@ -99,7 +100,10 @@ func main() {
if err := os.MkdirAll(*dir, 0700); err != nil {
fail(err.Error())
}
err = serve(*dir, pkg, *port, devmode, *debug)
if devmode && devdist == "" {
devdist = "./cmd/mdl/webapp/dist"
}
err = serve(*dir, pkg, *port, devdist, *debug)
case "version":
fmt.Printf("%s %s\n", os.Args[0], model.Version())
case "", "help":
@@ -112,7 +116,7 @@ func main() {
}
}

func serve(out, pkg string, port int, devmode, debug bool) error {
func serve(out, pkg string, port int, devdist string, debug bool) error {
// Retrieve initial design and create server.
b, err := codegen.JSON(pkg, debug)
if err != nil {
@@ -142,7 +146,7 @@ func serve(out, pkg string, port int, devmode, debug bool) error {
return err
}

return s.Serve(out, devmode, port)
return s.Serve(out, devdist, port)
}

func printUsage(fss ...*flag.FlagSet) {
8 changes: 4 additions & 4 deletions cmd/mdl/serve.go
Original file line number Diff line number Diff line change
@@ -51,11 +51,11 @@ var distFS embed.FS
// indicates where the view data structures are located. If devmode is true then
// the single page app is served directly from the source under the "webapp"
// directory. Otherwise, it is served from the code embedded in the Go executable.
func (s *Server) Serve(outDir string, devmode bool, port int) error {
func (s *Server) Serve(outDir, devDistPath string, port int) error {

if devmode {
// in devmode (go run), serve the webapp from filesystem
fs := http.FileSystem(http.Dir("./cmd/mdl/webapp/dist"))
if devDistPath != "" {
// in devmode, serve the webapp from filesystem
fs := http.FileSystem(http.Dir(devDistPath))
http.Handle("/", http.FileServer(fs))
} else {
sub, _ := fs.Sub(distFS, "webapp/dist")
Loading