Skip to content

Commit

Permalink
[#491] Merged main into dev-next to sync changes and bug fixes fo…
Browse files Browse the repository at this point in the history
…r 0.11.0
  • Loading branch information
Luna-Klatzer committed Oct 21, 2023
2 parents 7458beb + 30bf1f0 commit d9de99e
Show file tree
Hide file tree
Showing 76 changed files with 4,058 additions and 3,423 deletions.
62 changes: 43 additions & 19 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,59 +1,83 @@
<!--
Please read through the given
Comments are marked by arrows, like in lines 1 and 5. They will not be visible in the final pull request!
-->

## What type of change does this PR perform?

<!-- Add an x in the checkbox to mark it -->
<!-- Please put an X in the box of the line that applies -->
<!-- If you are unsure if your code is a breaking change, read this: https://nordicapis.com/what-are-breaking-changes-and-how-do-you-avoid-them -->

- [ ] Info or documentation change (Non-breaking change that updates dependencies, info files or online documentation)
- [ ] Website feature update or docs development changes (Change that changes the design or functionality of the websites or docs)
- [ ] Maintenance (Non-breaking change that updates dependencies)
- [ ] Info or documentation change (Non-breaking change that updates repo info files (e.g. README.md, CONTRIBUTING.md, etc.) or online documentation)
- [ ] Website feature update or docs development changes (Change that changes the design or functionality of the websites or docs)
- [ ] Development or internal changes (These changes do not add new features or fix bugs, but update the code in other ways)
- [ ] Bug fix (Non-breaking change which fixes an issue)
- [ ] New feature (Non-breaking change which adds functionality)
- [ ] Breaking change (Major bug fix or feature that would cause existing functionality to not work as expected.)
- [ ] Breaking change (Major bug fix or feature that would cause existing functionality not to work as expected.)
- [ ] Requires a documentation update, as it changes language or compiler behaviour

<!-- If you are unsure if your code is a breaking change, read this: https://nordicapis.com/what-are-breaking-changes-and-how-do-you-avoid-them -->

## Summary

<!-- Explain the reason for this pr, changes and solution briefly. -->
<!-- Explain the reason for this pr, changes, and solution briefly. -->

<!-- Write here -->
<!-- REPLACE ME -->

Closes # <!-- Remove this if this is not related to an issue -->
<!-- Uncomment if this closes an issue:
Closes #INSERT_NR
-->

## Summary of Changes
## List of Changes

<!-- Please explain the changes in this PR and their influence. If this fixes an issue, describe what fixed the issue. -->

<!-- Write here -->
<!-- Create for every essential change a list item (Link any issues, discussions or PRs if needed!) -->

- Change Nr. 1
- Change Nr. 2
- ...

## Does this PR create new warnings?

<!-- Add any new warnings or possible issues that could occur with this PR. -->

- Eslint reported ...
- CodeQL returned ...
- Warning Nr. 1
- Warning Nr. 2
- ...

<!-- Remove example text! -->
<!-- Just write none if they are no warnings, like this:
None.
-->

## Detailed Changelog

_Not present for website/docs changes_

<!-- Detailed changelog that may be copied from `CHANGELOG.md` (Only add the items you've added and remove any header with no item.). -->

<!-- ### Added -->
<!-- ### Changed -->
<!-- ### Removed -->
### Added

### Changed

### Fixed

### Deprecated

<!-- Default: -->
### Removed

<!-- Just write none if they are no changelog entries (although you should definitely do some if they change source code), like this:
None.
-->

## Linked issues or PRs

<!-- Include other issues and PRs related to this if any exist. Use this format: - [ ] #ISSUE_OR_PR -->

<!-- Default: -->
- [ ] #ISSUE_PR_OR_DISCUSSION_TAG
- [ ] #ISSUE_PR_OR_DISCUSSION_TAG
- [ ] ...

<!-- Just write the following if there are no linked issues:
No linked issues.
-->
2 changes: 1 addition & 1 deletion .github/workflows/cov-badge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
node-version: ${{ matrix.node-version }}
- uses: pnpm/[email protected]
with:
version: 7.x.x
version: 8.x.x
run_install: false
- run: pnpm install --frozen-lockfile
- run: pnpm test
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/nodejs-cli-run.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:

strategy:
matrix:
node-version: [14.x, 16.x, 18.x]
node-version: [16.x, 18.x]

steps:
- uses: actions/checkout@v3
Expand All @@ -22,7 +22,7 @@ jobs:
node-version: ${{ matrix.node-version }}
- uses: pnpm/[email protected]
with:
version: 7.x.x
version: 8.x.x
run_install: false
- run: pnpm install --frozen-lockfile
- run: pnpm build
Expand All @@ -34,7 +34,7 @@ jobs:

strategy:
matrix:
node-version: [14.x, 16.x, 18.x]
node-version: [16.x, 18.x]

steps:
- uses: actions/checkout@v3
Expand All @@ -44,7 +44,7 @@ jobs:
node-version: ${{ matrix.node-version }}
- uses: pnpm/[email protected]
with:
version: 7.x.x
version: 8.x.x
run_install: false
- run: pnpm install
- run: pnpm build
Expand All @@ -56,7 +56,7 @@ jobs:

strategy:
matrix:
node-version: [14.x, 16.x, 18.x]
node-version: [16.x, 18.x]

steps:
- uses: actions/checkout@v3
Expand All @@ -66,7 +66,7 @@ jobs:
node-version: ${{ matrix.node-version }}
- uses: pnpm/[email protected]
with:
version: 7.x.x
version: 8.x.x
run_install: false
- run: pnpm install --frozen-lockfile
- run: pnpm build
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/nodejs-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:

strategy:
matrix:
node-version: [14.x, 16.x, 18.x]
node-version: [16.x, 18.x]

steps:
- uses: actions/checkout@v3
Expand All @@ -19,7 +19,7 @@ jobs:
node-version: ${{ matrix.node-version }}
- uses: pnpm/[email protected]
with:
version: 7.x.x
version: 8.x.x
run_install: false
- run: pnpm install --frozen-lockfile
- run: pnpm test
Expand All @@ -30,7 +30,7 @@ jobs:

strategy:
matrix:
node-version: [14.x, 16.x, 18.x]
node-version: [16.x, 18.x]

steps:
- uses: actions/checkout@v3
Expand All @@ -40,7 +40,7 @@ jobs:
node-version: ${{ matrix.node-version }}
- uses: pnpm/[email protected]
with:
version: 7.x.x
version: 8.x.x
run_install: false
- run: pnpm i
- run: pnpm test
12 changes: 10 additions & 2 deletions .github/workflows/size-limit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,21 @@ on: pull_request
jobs:
size:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16.x]
env:
CI_JOB_NUMBER: 1
steps:
- uses: actions/checkout@v3
- name: Checkout repository
uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- uses: pnpm/[email protected]
with:
version: 7.0.0
version: 8.x.x
run_install: |
- recursive: true
- name: Build project
Expand Down
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,4 @@ kipper-standalone.min.js
kipper/web/src/
*.yaml
*.json
CITATION.cff
73 changes: 70 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,13 +123,77 @@ To use development versions of Kipper download the
of an error being thrown the failed result was returned (As defined in the `recover` behaviour, which is incorrect).
- Bug of invalid underline indent in error traceback.
([#434](https://github.com/Luna-Klatzer/Kipper/issues/434)).
- CLI error handling bug as described in [#491](https://github.com/Luna-Klatzer/Kipper/issues/491). This includes
multiple bugs where errors were reported as "Unexpected CLI Error". (This is the same fix as in `0.10.4`, but was
only added to the dev branch with the release of `0.11.0-alpha.1` i.e. `0.11.0-alpha.0` still has this bug).

### Deprecated

### Removed

</details>

## [0.10.4] - 2023-08-15

### Changed

- Moved function `executeKipperProgram` to `Run` as a private function.
- Moved class `KipperCompileResult` to new file `compile-result.ts` in the same directory.
- Field `KipperCompileResult.programCtx` can now be also `undefined`, due to the changed behaviour that now
a `KipperCompileResult` is also returned for syntax errors (where it has no value).

### Fixed

- CLI error handling bug as described in [#491](https://github.com/Luna-Klatzer/Kipper/issues/491). This includes
multiple bugs where errors were reported as "Unexpected CLI Error".

### Deprecated

- CLI flag `--abort-on-first-error` in favour of `--no-recover`. [#501](https://github.com/Luna-Klatzer/Kipper/issues/501).

## [0.10.3] - 2023-07-22

### Added

- New modules in `@kipper/cli`:
- `input`, which contains all input-related handling functions and classes.
- `output`, which contains the output-related handling functions and classes.
- New decorator `prettifiedErrors` in `@kipper/cli`, which applies standardised error formatting to any thrown error.

### Changed

- Standardised error output for the CLI as described in [#435](https://github.com/Luna-Klatzer/Kipper/issues/435).
- Error message of `KipperInternalError`, which does not have " - Report this bug to the developer using the traceback!"
as a suffix anymore.
- Changed success message of the `kipper analyse` command `Finished code analysis in ...` to `Done in ...`.
- Renamed `getFile` to `getParseStream`.

### Fixed

- CLI bug where the `-t` shortcut flag was incorrectly shown for the command `help compile`.
([#451](https://github.com/Luna-Klatzer/Kipper/issues/451))

## [0.10.2] - 2023-06-16

### Added

- New field:
- `KipperError.programCtx`, which contains, if `KipperError.tracebackData.errorNode` is not undefined, the program
context of the error.
- New function:
- `ensureScopeDeclarationAvailableIfNeeded`, which ensures that a scope declaration is available if needed. This
is used during the semantic analysis/type checking of a declaration statement, which may need the scope
declaration object during the processing.

### Fixed

- Redeclaration bug causing an `InternalError` after calling the compiler
([#462](https://github.com/Luna-Klatzer/Kipper/issues/462)).
- Compiler argument bug in `KipperCompiler`, where `abortOnFirstError` didn't precede `recover`, meaning that instead
of an error being thrown the failed result was returned (As defined in the `recover` behaviour, which is incorrect).
- Bug of invalid underline indent in error traceback.
([#434](https://github.com/Luna-Klatzer/Kipper/issues/434)).

## [0.10.1] - 2023-02-21

### Fixed
Expand Down Expand Up @@ -329,7 +393,7 @@ To use development versions of Kipper download the
- `ConstructableASTDeclaration`, which is a union type of all possible `Declaration` AST node instances.
- `ConstructableASTNode`, which is a union type of all possible `ASTNode` AST node instances.
- `ASTKind`, which represents a union of all AST node kind values that can be used to map a KipperParser rule context
to an AST node. This is the type representing all values from `ParseRuleKindMapping`.
to an AST node. This is the type representing all values from `ParserASTMapping`.
- `ConstructableASTKind`, which is the same as `ASTKind`, but removes any kind value that does not have a
corresponding AST node class.
- `KipperReferenceableFunction`, which represents a function that can be referenced by a `FunctionCallExpression`.
Expand Down Expand Up @@ -375,7 +439,7 @@ To use development versions of Kipper download the
- New constants:
- `kipperNullType`, which represents the Kipper null type.
- `kipperUndefinedType`, which represents the Kipper undefined type.
- `ParseRuleKindMapping`, which is a special mapping object used to get the AST kind number for a `KipperParser` rule ctx
- `ParserASTMapping`, which is a special mapping object used to get the AST kind number for a `KipperParser` rule ctx
instance.
- `kipperRuntimeBuiltInVariables`, which contains the built-in variables of the Kipper runtime.

Expand Down Expand Up @@ -1258,7 +1322,10 @@ To use development versions of Kipper download the

- Updated file structure to separate `commands` (for `oclif`) and `compiler` (for the compiler source-code)

[unreleased]: https://github.com/Luna-Klatzer/Kipper/compare/v0.10.1...HEAD
[unreleased]: https://github.com/Luna-Klatzer/Kipper/compare/v0.10.4...HEAD
[0.10.4]: https://github.com/Luna-Klatzer/Kipper/compare/v0.10.3...v0.10.4
[0.10.3]: https://github.com/Luna-Klatzer/Kipper/compare/v0.10.2...v0.10.3
[0.10.2]: https://github.com/Luna-Klatzer/Kipper/compare/v0.10.1...v0.10.2
[0.10.1]: https://github.com/Luna-Klatzer/Kipper/compare/v0.10.0...v0.10.1
[0.10.0]: https://github.com/Luna-Klatzer/Kipper/compare/v0.9.2...v0.10.0
[0.9.2]: https://github.com/Luna-Klatzer/Kipper/compare/v0.9.1...v0.9.2
Expand Down
36 changes: 36 additions & 0 deletions CITATION.cff
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
cff-version: 1.2.0
title: Kipper
message: >-
If you use this software, please cite it using the
metadata from this file.
type: software
authors:
- given-names: Luna
family-names: Klatzer
email: [email protected]
affiliation: HTL Leonding
orcid: 'https://orcid.org/0009-0001-5332-8988'
identifiers:
- type: url
value: >-
https://github.com/Kipper-Lang/Kipper/releases/tag/v0.10.4
description: The GitHub release URL of tag 0.10.4
repository-code: 'https://github.com/Kipper-Lang/Kipper/'
url: 'https://kipper-lang.org'
abstract: >-
Kipper is a JavaScript-like strongly and strictly typed
language with Python flavour. It aims to provide
straightforward, simple, secure and type-safe coding with
better efficiency and developer satisfaction. It compiles
to both JavaScript and TypeScript, and can be set up in
your terminal, Node.js or ES6+ browser.
keywords:
- compiler
- transpiler
- code-generation
- oop-programming
- type-safety
license: GPL-3.0-or-later
license-url: 'https://github.com/Kipper-Lang/Kipper/blob/v0.10.4/LICENSE'
version: 0.10.4
date-released: '2023-08-15'
14 changes: 12 additions & 2 deletions DEVELOPMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -157,8 +157,18 @@ which can be included and used inside a browser without any dependencies.
export const version = "MAJOR.MINOR.PATCH";
```

The easiest way to do this is to run `replace` in an IDE and replace the old versions with the new version. These
changes must be committed yourself with a commit message preferably similar to this:
The easiest way to do this is to run `replace` in an IDE and replace the old versions with the new version.

Additionally, you will have to update `CITATION.cff`, which contains the explanation for how to cite this project.
For that you will need to update every reference to the old version and replace it with the new one. The fields
that must be changed are as follows:

- `identifiers.value`
- `identifiers.description`
- `license-url`
- `version`

These changes must be committed yourself with a commit message preferably similar to this:

```
Bumped static index.ts versions to MAJOR.MINOR.PATCH
Expand Down
Loading

0 comments on commit d9de99e

Please sign in to comment.