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

Fixed roDeviceInfo method type and some test cases #689

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
d786413
refactor in preparation for adoption the project
TwitchBronBron Apr 19, 2023
fbaaed7
fix build script name
TwitchBronBron Apr 19, 2023
2ccec94
install node modules first
TwitchBronBron Apr 19, 2023
53c1aeb
break out tasks to view nicer failure spot
TwitchBronBron Apr 19, 2023
817c651
Add coverage reporting
TwitchBronBron Apr 19, 2023
e31226b
Actually add coverage reporting
TwitchBronBron Apr 19, 2023
b2d223a
fix coverage reporting
TwitchBronBron Apr 19, 2023
f1546e3
Merge pull request #1 from rokucommunity/adoption
TwitchBronBron Apr 24, 2023
94304cd
Fixed `val()` edge cases: hex without radix and `NaN`
lvcabral Sep 7, 2023
a223c2a
Fixed prettier and replaced deprecated `substr()` method
lvcabral Sep 7, 2023
ec82a06
Update README.md
TwitchBronBron Sep 8, 2023
afca557
Merge pull request #3 from rokucommunity/bugfix/string-val-function-n…
lvcabral Sep 8, 2023
f72f2dc
Add changelog
TwitchBronBron Sep 8, 2023
af0c223
Add note about the project fork.
TwitchBronBron Sep 8, 2023
202cc9f
Make tests import relative path to lib/index.js
TwitchBronBron Sep 8, 2023
ab5322a
0.45.1
TwitchBronBron Sep 9, 2023
7569e86
add logic for optional chaining (#21)
nadiapadalka Oct 25, 2023
e6c98ae
fix(interp): Preventing multiple calls for dot-chained methods (#22)
lvcabral Oct 31, 2023
98dcee2
fix(parser): Wrong negative sign precedence was causing math errors (…
lvcabral Nov 1, 2023
d8878a9
update changelog for v0.45.2
TwitchBronBron Nov 8, 2023
7ef68bb
0.45.2
TwitchBronBron Nov 8, 2023
5f13b59
fix(components): Replacing package luxon by day.js on `roDateTime` an…
lvcabral Nov 21, 2023
e98151c
fix(parser,lexer) Optional chaining implementation side effect #30 (#31)
lvcabral Dec 1, 2023
6e5b422
feat(components): Implemented missing `ifEnum` methods in `roArray` a…
lvcabral Dec 1, 2023
b8e459a
feat(lex,parse): Add stub try/catch implementation (#34)
lvcabral Dec 1, 2023
a5e0217
Adds create-package CI build for quicker iteration (#36)
TwitchBronBron Dec 1, 2023
bcda693
fix(lib): Component XML path parsing was failing on edge case (#37)
lvcabral Dec 1, 2023
60abf73
Update changelog for v0.45.3
TwitchBronBron Dec 1, 2023
6a59ad8
0.45.3
TwitchBronBron Dec 1, 2023
d66a0ed
Fixed #16 Print leading space before positive numbers (#39)
lvcabral Dec 11, 2023
7cdd4a3
Fixed #38 Improved context handling for Callables (#40)
lvcabral Dec 11, 2023
bcf6142
Fixed #41 - Global functions `GetInterface()` and `FindMemberFunction…
lvcabral Jan 18, 2024
90f0df1
Update changelog for v0.45.4
TwitchBronBron Jan 18, 2024
b5f9d5c
0.45.4
TwitchBronBron Jan 18, 2024
91af226
Fixed #43 - Implemented `roString` methods `startsWith()` and `endsWi…
lvcabral Feb 7, 2024
88627e7
Fixed Arithmetic Operator Modulo behavior to match Roku (#46)
lvcabral Mar 25, 2024
6bc289f
Fixed path handling for Windows #27 (#45)
lvcabral Mar 25, 2024
f42bcc1
Implemented component `roList` (#48)
lvcabral Mar 26, 2024
6a54ab6
Update changelog for v0.45.5
TwitchBronBron Mar 28, 2024
619d5b3
0.45.5
TwitchBronBron Mar 28, 2024
de423b4
Added to CLI: colorization and commans `help`, `clear` and `vars` (#49)
lvcabral Mar 30, 2024
97728a5
Added support for bitwise NOT for numeric values (#51)
lvcabral Apr 1, 2024
ac1cd3e
Implemented `roPath` component and fixed Interpreter Comparisons (#50)
lvcabral Apr 1, 2024
d78ff38
Implemented `roByteArray` component (#53)
lvcabral Apr 3, 2024
5ea0f3c
Implemented `Box()` function and improved boxing (#54)
lvcabral Apr 3, 2024
23ab673
Implemented `slice()` method in `roArray` under `ifArraySlice` (#61)
lvcabral Apr 3, 2024
44e5acc
Implement `ifArraySizeInfo` in `roArray` (#62)
lvcabral Apr 4, 2024
75440ab
Fixed `print` semi-colon behavior (#67)
lvcabral Apr 17, 2024
f67cefd
Fix `roDeviceInfo` method typo and some test cases
lvcabral Apr 27, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
70 changes: 70 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
name: build
on:
push:
branches:
- master
tags:
- v*
pull_request:

jobs:
ci:
runs-on: ${{ matrix.os }}
env:
#hardcode the coveralls token...it's not overly important to protect, and github actions won't allow forks to work with coveralls otherwise
COVERALLS_REPO_TOKEN: 83xyW4IxLCtIw0LxM8NoMeRDGWj8bYYq5
CI: true
strategy:
matrix:
os: [ubuntu-latest] #, macos-latest, windows-latest]
steps:
- uses: actions/checkout@master
- uses: actions/setup-node@master
with:
node-version: "12.22.7"
- run: npm ci
- run: npm run build
- run: npm run lint
- run: npm run prettier
- run: npm run test
- run: npm run publish-coverage
npm-release:
#only run this task if a tag starting with 'v' was used to trigger this (i.e. a tagged release)
if: startsWith(github.ref, 'refs/tags/v')
needs: ci
runs-on: ubuntu-latest
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
steps:
- uses: actions/checkout@master
- uses: actions/setup-node@master
with:
node-version: "12.22.7"
- run: echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ./.npmrc
- run: npm ci
- run: npm run build
#create npm package
- run: npm pack

#create GitHub release
- name: Create GitHub Release
id: create_release
uses: actions/create-release@latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: ${{ github.ref }}
draft: false
prerelease: false #contains(github.ref, '-beta.') == true

#upload package to GitHub release
- name: Upload GitHub Release Assets
uses: alexellis/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
asset_paths: '["./*.tgz"]'

#upload to npm
- run: npm publish
57 changes: 57 additions & 0 deletions .github/workflows/create-package.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: create-package
on:
pull_request:
types: [labeled, unlabeled, synchronize]
jobs:
create-package:
runs-on: ubuntu-latest
if: contains(github.event.pull_request.labels.*.name, 'create-package')
env:
GH_TOKEN: ${{ github.token }}
steps:
- uses: actions/checkout@master
- uses: actions/setup-node@master
with:
node-version: "14.19.0"
# Get a bot token so the bot's name shows up on all our actions
- name: Get Token From roku-ci-token Application
uses: tibdex/github-app-token@v1
id: generate-token
with:
app_id: ${{ secrets.BOT_APP_ID }}
private_key: ${{ secrets.BOT_PRIVATE_KEY }}
- run: echo "TOKEN=${{ steps.generate-token.outputs.token }}" >> $GITHUB_ENV
- name: Compute variables
run: |
CURRENT_VERSION=$(grep -o '\"version\": *\"[^\"]*\"' package.json | awk -F'\"' '{print $4}')
SANITIZED_BRANCH_NAME=$(echo "$GITHUB_HEAD_REF" | sed 's/[^0-9a-zA-Z-]/-/g')
BUILD_VERSION="$CURRENT_VERSION-$SANITIZED_BRANCH_NAME.$(date +%Y%m%d%H%M%S)"
NPM_PACKAGE_NAME=$(grep -o '\"name\": *\"[^\"]*\"' package.json | awk -F'\"' '{print $4}' | sed -e 's/@//g' -e 's#/#-#g')
ARTIFACT_NAME=$(echo "$NPM_PACKAGE_NAME-$BUILD_VERSION.tgz" | tr '/' '-')
ARTIFACT_URL="${{ github.server_url }}/${{ github.repository }}/releases/download/v0.0.0-packages/${ARTIFACT_NAME}"

echo "BUILD_VERSION=$BUILD_VERSION" >> $GITHUB_ENV
echo "ARTIFACT_URL=$ARTIFACT_URL" >> $GITHUB_ENV

- run: npm ci
- run: npm version "$BUILD_VERSION" --no-git-tag-version
- run: npm pack

# create the release if not exist
- run: gh release create v0.0.0-packages --title "v0.0.0-packages" --latest=false --prerelease --notes "catchall release for temp packages" -R ${{ github.repository }}
continue-on-error: true

# upload this artifact to the "packages" github release
- run: gh release upload v0.0.0-packages *.tgz -R ${{ github.repository }}

- name: Fetch build artifact
uses: actions/github-script@v7
with:
github-token: ${{ env.TOKEN }}
script: |
return github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: "Hey there! I just built a new temporary npm package based on ${{ github.event.pull_request.head.sha }}. You can download it [here](${{ env.ARTIFACT_URL }}) or install it by running the following command: \n```bash\nnpm install ${{ env.ARTIFACT_URL }}\n```"
});
50 changes: 0 additions & 50 deletions .github/workflows/nightly-build.yaml

This file was deleted.

40 changes: 0 additions & 40 deletions .github/workflows/pull-request.yaml

This file was deleted.

37 changes: 0 additions & 37 deletions .github/workflows/release.yaml

This file was deleted.

4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
.idea/
.vscode/settings.json
lib/
types/
node_modules/
.vscode/
coverage/
.DS_Store
12 changes: 0 additions & 12 deletions .travis.yml

This file was deleted.

14 changes: 14 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"version": "2.0.0",
"tasks": [
{
"label": "test",
"command": "npm run test:nocover",
"type": "shell",
"group": {
"kind": "test",
"isDefault": true
}
}
]
}
53 changes: 53 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# Changelog
All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).



## [0.45.5](https://github.com/rokucommunity/brs/compare/v0.45.4...v0.45.5) - 2024-03-28
### Added
- implemented `roString` methods `startsWith()` and `endsWith()` ([#44](https://github.com/rokucommunity/brs/pull/44))
- implemented component `roList` ([#48](https://github.com/rokucommunity/brs/pull/48))
### Fixed
- path handling for Windows #27 ([#45](https://github.com/rokucommunity/brs/pull/45))
- arithmetic Operator Modulo behavior to match Roku ([#46](https://github.com/rokucommunity/brs/pull/46))



## [0.45.4](https://github.com/rokucommunity/brs/compare/v0.45.3...v0.45.4) - 2024-01-18
### Fixed
- fixed #41 - Global functions `GetInterface()` and `FindMemberFunction()` are not properly boxing parameters ([#42](https://github.com/rokucommunity/brs/pull/42))
- fixed #38 - Improved context handling for Callables ([#40](https://github.com/rokucommunity/brs/pull/40))
- fixed #16 - Print leading space before positive numbers ([#39](https://github.com/rokucommunity/brs/pull/39))



## [0.45.3](https://github.com/rokucommunity/brs/compare/v0.45.2...v0.45.3) - 2023-12-01
### Added
- missing `ifEnum` methods in `roArray` and `roAssociativeArray` ([#33](https://github.com/rokucommunity/brs/pull/33))
- stub try/catch implementation ([#34](https://github.com/rokucommunity/brs/pull/34))
### Changed
- replace package luxon by day.js on `roDateTime` and `roTimespan` #28 ([#29](https://github.com/rokucommunity/brs/pull/29))
### Fixed
- component XML path parsing was failing on edge case ([#37](https://github.com/rokucommunity/brs/pull/37))
- optional chaining implementation side effect #30 ([#31](https://github.com/rokucommunity/brs/pull/31))



## [0.45.2](https://github.com/rokucommunity/brs/compare/v0.45.1...v0.45.2) - 2023-11-07
### Added
- logic for optional chaining ([#21](https://github.com/rokucommunity/brs/pull/21))
### Fixed
- fix(parser): Wrong negative sign precedence was causing math errors (#6) ([#24](https://github.com/rokucommunity/brs/pull/24))
- fix(interp): Preventing multiple calls for dot-chained methods ([#22](https://github.com/rokucommunity/brs/pull/22))



## [0.45.1](https://github.com/rokucommunity/brighterscript/compare/v0.45.0...v0.45.1) - 2023-09-08
### Changed
- This is the first release of the RokuCommunity fork of this project
- remove yarn in favor of npm ([#1](https://github.com/rokucommunity/brs/pull/1))
### Fixed
- Fixed `val()` edge cases: hex without radix and `NaN` ([#3](https://github.com/rokucommunity/brs/pull/3))
6 changes: 3 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Since this project is still maturing, many of its initial contributions will tak

## Submitting Issues

If you find something wrong with `brs`, or something doesn't seem right, feel free to [open a new issue](https://github.com/sjbarag/brs/issues/new). Please try to avoid "how do I X in BrightScript" questions however — those are best suited for [StackOverflow](https://stackoverflow.com) or similar Q&A sites.
If you find something wrong with `brs`, or something doesn't seem right, feel free to [open a new issue](https://github.com/rokucommunity/brs/issues/new). Please try to avoid "how do I X in BrightScript" questions however — those are best suited for [StackOverflow](https://stackoverflow.com) or similar Q&A sites.

### Bug Reports

Expand Down Expand Up @@ -43,7 +43,7 @@ Regardless of whether you're fixing bugs or implementing new features, there's a

1. Comment on the issue and tell us that you're intereseted in working on it. This should lower the (admittedly rare) chances of someone stealing your that bug/feature from you :smile:.
1. Create a fork of this repo if you haven't already
1. Send us a [pull request](https://github.com/sjbarag/brs/pulls)!
1. Send us a [pull request](https://github.com/rokucommunity/brs/pulls)!

### Adding a component

Expand All @@ -53,6 +53,6 @@ For guidelines on adding a component to `brs`, see [this doc](docs/AddingCompone

There aren't to many mandatory things for pull requests, besides what you'd expect from any open-source project (e.g. "don't delete all the code", "don't delete a user's home directory at runtime"). The most important project-specific "must-haves" that we'll look for that are:

1. Pull requests should be based on a pretty recent version of the `main` branch, to minimize merge conflicts.
1. Pull requests should be based on a pretty recent version of the `master` branch, to minimize merge conflicts.
1. All tests should pass (Travis CI will let us know if any fail).
1. End to end tests written in BrightScript should be present to exercise the bug or new feature. These don't need to be exhaustive — just enough to ensure that the major use-cases are covered. More in-depth testing can happen via unit test.
Loading
Loading