Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hereje/i763/refactor/migrate to esm/concerto analysis #784

Conversation

hereje
Copy link

@hereje hereje commented Jan 14, 2024

Closes #763 => packages/concerto-analysis

Changes

  • Migrate project concerto analysis to ESM
  • update configuration to ESM
  • fix migration issues

Flags

  • Take a look at jest configuration on package.json

Screenshots or Video

Related Issues

  • Issue #
  • Pull Request #

Author Checklist

  • Ensure you provide a DCO sign-off for your commits using the --signoff option of git commit.
  • Vital features and changes captured in unit and/or integration tests
  • Commits messages follow AP format
  • Extend the documentation, if necessary
  • Merging to main from hereje:hereje/i763/refactor/migrate-to-esm/concerto-analysis

mttrbrts and others added 8 commits November 24, 2023 13:26
* feat(types): build uniontypes too

Signed-off-by: Matt Roberts <[email protected]>

* fix(build): include unions in index

Signed-off-by: Matt Roberts <[email protected]>

* chore(deps): upgrade codegen to latest release

Signed-off-by: Matt Roberts <[email protected]>

---------

Signed-off-by: Matt Roberts <[email protected]>
…#767)

* fix(parser): throw error when concept is extending itself in CTO

Signed-off-by: Stefan Blaginov <[email protected]>
Signed-off-by: Stefan Blaginov <[email protected]>

* fix(parser): throw error when concept is extending itself in JSON metamodel form

Signed-off-by: Stefan Blaginov <[email protected]>
Signed-off-by: Stefan Blaginov <[email protected]>

* fix(parser): throw error when concept is extending itself in the AST

Signed-off-by: Stefan Blaginov <[email protected]>
Signed-off-by: Stefan Blaginov <[email protected]>

* refactor(validation): alphabetical rearrangement

Signed-off-by: Stefan Blaginov <[email protected]>
Signed-off-by: Stefan Blaginov <[email protected]>

* test(self-extending): remove redundant tests (codepath covered in concerto-cto)

Signed-off-by: Stefan Blaginov <[email protected]>
Signed-off-by: Stefan Blaginov <[email protected]>

* test(fix): remove unneeded import

Signed-off-by: Stefan Blaginov <[email protected]>
Signed-off-by: Stefan Blaginov <[email protected]>

---------

Signed-off-by: Stefan Blaginov <[email protected]>
Signed-off-by: Stefan Blaginov <[email protected]>
Co-authored-by: Stefan Blaginov <[email protected]>
…ccordproject#773)

* fix(error): adding type to error in string validator in introspect

Signed-off-by: Santanu Roy <[email protected]>
Co-authored-by: Santanu Roy <[email protected]>
- cahnge config from commonjs to esm
- solve migration issues

Signed-off-by: Angel Mendez <[email protected]>
@hereje hereje force-pushed the hereje/i763/refactor/migrate-to-esm/concerto-analysis branch from 118fb55 to 07dac94 Compare January 14, 2024 20:48
hereje and others added 15 commits January 23, 2024 16:26
…/concerto-util (accordproject#780)

chore(deps): bump follow-redirects in /packages/concerto-util

Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.15.0 to 1.15.4.
- [Release notes](https://github.com/follow-redirects/follow-redirects/releases)
- [Commits](follow-redirects/follow-redirects@v1.15.0...v1.15.4)

---
updated-dependencies:
- dependency-name: follow-redirects
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…ages/concerto-types (accordproject#783)

chore(deps-dev): bump follow-redirects in /packages/concerto-types

Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.15.3 to 1.15.4.
- [Release notes](https://github.com/follow-redirects/follow-redirects/releases)
- [Commits](follow-redirects/follow-redirects@v1.15.3...v1.15.4)

---
updated-dependencies:
- dependency-name: follow-redirects
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…/concerto-vocabulary (accordproject#782)

chore(deps): bump follow-redirects in /packages/concerto-vocabulary

Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.15.3 to 1.15.4.
- [Release notes](https://github.com/follow-redirects/follow-redirects/releases)
- [Commits](follow-redirects/follow-redirects@v1.15.3...v1.15.4)

---
updated-dependencies:
- dependency-name: follow-redirects
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…dproject/concerto-util in /packages/concerto-cto (accordproject#786)

chore(deps): bump axios, @accordproject/concerto-metamodel and @accordproject/concerto-util

Bumps [axios](https://github.com/axios/axios) to 1.6.0 and updates ancestor dependencies [axios](https://github.com/axios/axios), [@accordproject/concerto-metamodel](https://github.com/accordproject/concerto/tree/HEAD/packages/concerto-metamodel) and [@accordproject/concerto-util](https://github.com/accordproject/concerto/tree/HEAD/packages/concerto-util). These dependencies need to be updated together.


Updates `axios` from 0.23.0 to 1.6.0
- [Release notes](https://github.com/axios/axios/releases)
- [Changelog](https://github.com/axios/axios/blob/v1.x/CHANGELOG.md)
- [Commits](axios/axios@v0.23.0...v1.6.0)

Updates `@accordproject/concerto-metamodel` from 3.8.1 to 3.9.1
- [Release notes](https://github.com/accordproject/concerto/releases)
- [Commits](https://github.com/accordproject/concerto/commits/v3.9.1/packages/concerto-metamodel)

Updates `@accordproject/concerto-util` from 3.13.0 to 3.16.1
- [Release notes](https://github.com/accordproject/concerto/releases)
- [Changelog](https://github.com/accordproject/concerto/blob/main/packages/concerto-util/changelog.txt)
- [Commits](https://github.com/accordproject/concerto/commits/v3.16.1/packages/concerto-util)

---
updated-dependencies:
- dependency-name: axios
  dependency-type: indirect
- dependency-name: "@accordproject/concerto-metamodel"
  dependency-type: direct:production
- dependency-name: "@accordproject/concerto-util"
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…kages/concerto-core (accordproject#789)

chore(deps): bump axios and @accordproject/concerto-metamodel

Bumps [axios](https://github.com/axios/axios) to 1.6.7 and updates ancestor dependency [@accordproject/concerto-metamodel](https://github.com/accordproject/concerto/tree/HEAD/packages/concerto-metamodel). These dependencies need to be updated together.


Updates `axios` from 0.23.0 to 1.6.7
- [Release notes](https://github.com/axios/axios/releases)
- [Changelog](https://github.com/axios/axios/blob/v1.x/CHANGELOG.md)
- [Commits](axios/axios@v0.23.0...v1.6.7)

Updates `@accordproject/concerto-metamodel` from 3.9.0 to 3.9.1
- [Release notes](https://github.com/accordproject/concerto/releases)
- [Commits](https://github.com/accordproject/concerto/commits/v3.9.1/packages/concerto-metamodel)

---
updated-dependencies:
- dependency-name: axios
  dependency-type: indirect
- dependency-name: "@accordproject/concerto-metamodel"
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…roject#790)

Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.15.2 to 1.15.5.
- [Release notes](https://github.com/follow-redirects/follow-redirects/releases)
- [Commits](follow-redirects/follow-redirects@v1.15.2...v1.15.5)

---
updated-dependencies:
- dependency-name: follow-redirects
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…o-core (accordproject#792)

chore(deps-dev): bump axios in /packages/concerto-core

Bumps [axios](https://github.com/axios/axios) from 0.23.0 to 1.6.0.
- [Release notes](https://github.com/axios/axios/releases)
- [Changelog](https://github.com/axios/axios/blob/v1.x/CHANGELOG.md)
- [Commits](axios/axios@v0.23.0...v1.6.0)

---
updated-dependencies:
- dependency-name: axios
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…le (accordproject#794)

* refactor(declarations): Move unique name check to model file.

Signed-off-by: Ertugrul Karademir <[email protected]>

* refactor(test): move validation checks for duplicate class to model file

Signed-off-by: Ertugrul Karademir <[email protected]>

* test: empty commit to trigger test

Signed-off-by: Ertugrul Karademir <[email protected]>

---------

Signed-off-by: Ertugrul Karademir <[email protected]>
refactor: don't use arrays to check uniqueness

Signed-off-by: Ertugrul Karademir <[email protected]>
accordproject#804)

* refactor: don't use arrays to check uniqueness

Signed-off-by: Ertugrul Karademir <[email protected]>

* refactor: also refactor unique property name check

Signed-off-by: Ertugrul Karademir <[email protected]>

* refactor: remove array for decorator uniqueness check

Signed-off-by: Ertugrul Karademir <[email protected]>

* refactor: remove uniqueness check from scalar declarations as well

Signed-off-by: Ertugrul Karademir <[email protected]>

---------

Signed-off-by: Ertugrul Karademir <[email protected]>
@mttrbrts mttrbrts changed the base branch from main to v4.0.0 February 6, 2024 14:59
github-actions bot and others added 5 commits February 7, 2024 11:15
Signed-off-by: Sanket Shevkar <[email protected]>
Co-authored-by: Sanket Shevkar <[email protected]>
Bumps [ip](https://github.com/indutny/node-ip) from 2.0.0 to 2.0.1.
- [Commits](indutny/node-ip@v2.0.0...v2.0.1)

---
updated-dependencies:
- dependency-name: ip
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…roject/concerto-core in /packages/concerto-types (accordproject#809)

chore(deps): bump axios, @accordproject/concerto-codegen and @accordproject/concerto-core

Bumps [axios](https://github.com/axios/axios) to 1.6.0 and updates ancestor dependencies [axios](https://github.com/axios/axios), [@accordproject/concerto-codegen](https://github.com/accordproject/concerto-codegen/tree/HEAD/packages/concerto-codegen) and [@accordproject/concerto-core](https://github.com/accordproject/concerto/tree/HEAD/packages/concerto-cto). These dependencies need to be updated together.


Updates `axios` from 0.23.0 to 1.6.0
- [Release notes](https://github.com/axios/axios/releases)
- [Changelog](https://github.com/axios/axios/blob/v1.x/CHANGELOG.md)
- [Commits](axios/axios@v0.23.0...v1.6.0)

Updates `@accordproject/concerto-codegen` from 3.17.0 to 3.22.1
- [Release notes](https://github.com/accordproject/concerto-codegen/releases)
- [Commits](https://github.com/accordproject/concerto-codegen/commits/v3.22.1/packages/concerto-codegen)

Updates `@accordproject/concerto-core` from 3.16.1 to 3.16.5
- [Release notes](https://github.com/accordproject/concerto/releases)
- [Commits](https://github.com/accordproject/concerto/commits/v3.16.5/packages/concerto-cto)

---
updated-dependencies:
- dependency-name: axios
  dependency-type: indirect
- dependency-name: "@accordproject/concerto-codegen"
  dependency-type: direct:development
- dependency-name: "@accordproject/concerto-core"
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
github-actions bot and others added 28 commits April 18, 2024 14:10
…ordproject#843)

fix(core): private accept methods in introspect classes - I839

Signed-off-by: Apoorv Saxena <[email protected]>
Bumps [ejs](https://github.com/mde/ejs) from 3.1.9 to 3.1.10.
- [Release notes](https://github.com/mde/ejs/releases)
- [Commits](mde/ejs@v3.1.9...v3.1.10)

---
updated-dependencies:
- dependency-name: ejs
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* fix(core): missing serializer option in typedef

Signed-off-by: Matt Roberts <[email protected]>

* chore(core): update api.txt

Signed-off-by: Matt Roberts <[email protected]>

---------

Signed-off-by: Matt Roberts <[email protected]>
accordproject#837)

* Fixed no such file error

Signed-off-by: Subhajit Ghosh <[email protected]>

* Join the  directory and path of the file using path.join

Signed-off-by: Subhajit Ghosh <[email protected]>

* Added comma seperated list arguement into path.join function

Signed-off-by: Subhajit Ghosh <[email protected]>

* Update packages/concerto-core/test/decoratormanager.js

---------

Signed-off-by: Subhajit Ghosh <[email protected]>
Co-authored-by: Matt Roberts <[email protected]>
* chore(dep): axios version

Signed-off-by: Ertugrul Karademir <[email protected]>

* chore: update individual package-locks too

Signed-off-by: Ertugrul Karademir <[email protected]>

---------

Signed-off-by: Ertugrul Karademir <[email protected]>
Bumps [braces](https://github.com/micromatch/braces) from 3.0.2 to 3.0.3.
- [Changelog](https://github.com/micromatch/braces/blob/master/CHANGELOG.md)
- [Commits](micromatch/braces@3.0.2...3.0.3)

---
updated-dependencies:
- dependency-name: braces
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* fix(core): falsy default values

Signed-off-by: Matt Roberts <[email protected]>

* fix(analysis): add compare for implict optional via falsy default

Signed-off-by: Matt Roberts <[email protected]>

* refactor(core): more isNull util to concerto-util package

Signed-off-by: Matt Roberts <[email protected]>

---------

Signed-off-by: Matt Roberts <[email protected]>
Signed-off-by: Matt Roberts <[email protected]>
* feat: Alias Import rules added

* Rules for AliasedIdentifier and Types added.
* aliasedTypes filtered in callback of ImportTypes

Signed-off-by: Jaskeerat Singh Saluja <[email protected]>

* feat: Grammar rules updated

- as token defined for aliasing types in the import statements
- as is defined local reserved word
- AST made backward compatible

Signed-off-by: Jaskeerat Singh Saluja <[email protected]>

* feat: Printer updated

- Printer now handles the aliased types.
- Test case added for parser and printer.

Signed-off-by: Jaskeerat Singh Saluja <[email protected]>

* feat(alias import): Printer and parser test cases

- Test case added containing alias import

Signed-off-by: Jaskeerat Singh Saluja <[email protected]>

* feat(alias import): test cases for updated grammar

- test cases added for both parser and printer
- bad test cases added as well for the parser

Signed-off-by: Jaskeerat Singh Saluja <[email protected]>

* feat(alias import): PR changes

- renamed the Types rule to IdentifierTypeExpression
- Indentation fixed
- Extra white spaces removed

Signed-off-by: Jaskeerat Singh Saluja <[email protected]>

* feat(alias): Minor fixes

- Code changes made on suggestion.

Signed-off-by: Jaskeerat Singh Saluja <[email protected]>

* feat(alias): disabled aliasing to primitive types

Signed-off-by: Jaskeerat Singh Saluja <[email protected]>

* feat(alias): handle pr comments

- Test cases added
- pr comments handled

Signed-off-by: Jaskeerat Singh Saluja <[email protected]>

* feat(alias): variables renamed and code cleaned

Signed-off-by: Jaskeerat Singh Saluja <[email protected]>

* feat(alias import): printer code refactored

- printer code refactored
- coverage 100% tested locally

Signed-off-by: Jaskeerat Singh Saluja <[email protected]>

* feat(alias import): Updated concerto-metamodel version

Signed-off-by: Jaskeerat Singh Saluja <[email protected]>

* feat(alias import): Pr suggestion : code refactor

Signed-off-by: Jaskeerat Singh Saluja <[email protected]>

* feat(alias):package-lock.json fixed

Signed-off-by: Jaskeerat Singh Saluja <[email protected]>

* feat(alias): fixing pr

Signed-off-by: Jaskeerat Singh Saluja <[email protected]>

---------

Signed-off-by: Jaskeerat Singh Saluja <[email protected]>
…project#877)

* fix(core): new pathway to apply namespace targeted decorators

Signed-off-by: sanketshevkar <[email protected]>

* fix(core): apply suggested changes

Signed-off-by: sanketshevkar <[email protected]>

* fix(util): browser polyfill for process.emitWarning

Signed-off-by: sanketshevkar <[email protected]>

---------

Signed-off-by: sanketshevkar <[email protected]>
…ing (accordproject#860)

* feat(alias import): Optional field aliasImport added to basemodelmanager

- TODO marked
- aliasImport handling in runtime separated from rest code to prevent
  breaking changes

Signed-off-by: Jaskeerat Singh Saluja <[email protected]>

* feat(alias import): modelfile.js alias imports handled

- alias types mapped to fqn in the importShortNames

Signed-off-by: Jaskeerat Singh Saluja <[email protected]>

* feat(import alias):concerto-core modefile update

- Handled PR changes
- types can't be aliased to primitive types

Signed-off-by: Jaskeerat Singh Saluja <[email protected]>

* feat(alias import): Test Cases added

Following are the test-cases added:

- resolve alias type from import
- validate alias type
- validate map using alias type as value

Signed-off-by: Jaskeerat Singh Saluja <[email protected]>

* feat(alias import): Types updated ; Minor version updated

Signed-off-by: Jaskeerat Singh Saluja <[email protected]>

* feat(alias): Pr suggestion added

- Added new test case where a concept is extended on a aliased import
  type concept
- removed unecessary comments and formated code

Signed-off-by: Jaskeerat Singh Saluja <[email protected]>

* feat(alias): aliasName renamed to aliasedName

Signed-off-by: Jaskeerat Singh Saluja <[email protected]>

---------

Signed-off-by: Jaskeerat Singh Saluja <[email protected]>
- cahnge config from commonjs to esm
- solve migration issues

Signed-off-by: Angel Mendez <[email protected]>
* v4.0.0-alpha.0

* feat!(*): strict by default

Signed-off-by: Matt Roberts <[email protected]>

* test(*): version everything

Signed-off-by: Matt Roberts <[email protected]>

* test(*): fix more tests

Signed-off-by: Matt Roberts <[email protected]>

* refactor(core): modelfile logic for isImportedType

Signed-off-by: Matt Roberts <[email protected]>

---------

Signed-off-by: Matt Roberts <[email protected]>
* chore!(core): migrate to TS project

Signed-off-by: Matt Roberts <[email protected]>

* chore!(*): migrate vocab, util and cto packages to TS projects

Signed-off-by: Matt Roberts <[email protected]>

* fix(deps): npm-run-all

Signed-off-by: Matt Roberts <[email protected]>

* fix(*): code coverage

Signed-off-by: Matt Roberts <[email protected]>

* chore(*): migrate to npm workspaces

Signed-off-by: Matt Roberts <[email protected]>

---------

Signed-off-by: Matt Roberts <[email protected]>

fix(*): fix buggy merge conflicts

Signed-off-by: Matt Roberts <[email protected]>

fix(build): topological sort of packages

Signed-off-by: Matt Roberts <[email protected]>

fix(build): topological sort of package names 2

Signed-off-by: Matt Roberts <[email protected]>
* fix(core): detect ambiguous imports / declarations

Signed-off-by: Matt Roberts <[email protected]>

* fix(lint): assetdeclaration

Signed-off-by: Matt Roberts <[email protected]>

---------

Signed-off-by: Matt Roberts <[email protected]>
@hereje hereje closed this Jul 24, 2024
@hereje hereje deleted the hereje/i763/refactor/migrate-to-esm/concerto-analysis branch July 24, 2024 15:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Migrate to ESM from CommonJS Modules
9 participants