Commit Graph
28 Commits
Author SHA1 Message Date
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>David Lechner
3d4fe32303 build(deps): bump pyodide from 0.21.3 to 0.22.0 (#1420)
* build(deps): bump pyodide from 0.21.3 to 0.22.0

Bumps [pyodide](https://github.com/pyodide/pyodide) from 0.21.3 to 0.22.0.
- [Release notes](https://github.com/pyodide/pyodide/releases)
- [Commits](https://github.com/pyodide/pyodide/compare/0.21.3...0.22.0)

---
updated-dependencies:
- dependency-name: pyodide
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* yarn: drop pyodide patch

Fixes were merged upstream.

* webpack: drop pyodide/distuils.tar

This file is no longer distributed in the pyodide package.

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: David Lechner <david@pybricks.com>
2023-01-04 16:45:44 +00:00
David LechnerandDavid Lechner 601b111ec4 config/licenses: drop fedorIndutnyLicense
We no longer have any dependencies from this author.
2022-12-19 15:17:31 -06:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>David Lechner
5afaa12df9 build(deps): bump react-aria from 3.21.0 to 3.22.0 (#1385)
* build(deps): bump react-aria from 3.21.0 to 3.22.0

Bumps [react-aria](https://github.com/adobe/react-spectrum) from 3.21.0 to 3.22.0.
- [Release notes](https://github.com/adobe/react-spectrum/releases)
- [Commits](https://github.com/adobe/react-spectrum/compare/react-aria@3.21.0...react-aria@3.22.0)

---
updated-dependencies:
- dependency-name: react-aria
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* config/licenses: add generic MIT for @swc/helpers

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: David Lechner <david@pybricks.com>
2022-12-19 16:14:38 +00:00
David LechnerandDavid Lechner 6dc03ad911 webpackDevServer: don't fallback or redirect to index
This was causing problems when we typed in a bad URL since instead of
getting the expected 404 error, we just got the index page no matter
what the request was actually for.
2022-12-08 17:10:47 -06:00
David LechnerandDavid Lechner 004667b80b webpack: finish TODO about avif file types
was fixed in https://github.com/jshttp/mime-db/commit/65f65eda094a8ec206f9144584657ff14fd597ab
2022-11-22 15:56:56 -06:00
David LechnerandDavid Lechner efec127b8e webpack: precache oss-licenses.json
This works around the oss-licenses.json file not being picked up by
the workbox plugin.

Closes: https://github.com/pybricks/pybricks-code/issues/1245
2022-11-19 16:58:27 -06:00
David LechnerandDavid Lechner 61098453c7 webpack: move monoaco editor js into static/js folder
All other js files are there already.
2022-11-19 16:58:27 -06:00
David LechnerandDavid Lechner 3e50e58206 mpy/sagas: use "new" webpack asset URL
Jest added support for wasm imports which broke our tests. In the mean
time, Webpack 5 added a new asset inclusion mechanism that can work
around this and removes the need for our existing webpack workaround.
2022-11-10 13:47:16 -06:00
David LechnerandDavid Lechner 90b04f85b3 webpack: add hack to remove unused icons
This follows the suggestions from [1] to reduce the package size by
only including the icons we are actually using. This gets the main
module small enough to avoid the CRA "The bundle size is significantly
larger than recommended." warning (gzipped size is < 512KB).

[1]: https://github.com/palantir/blueprint/issues/2193
2022-10-27 13:17:51 -05:00
David LechnerandDavid Lechner cc37548e36 pybricksMicropython/lib: replace parser
This replaces the Python parsing library. The python-ast package has
really poor performance (many seconds to parse a 500 line file). The
new package can parse a file about 100 times faster.
2022-10-24 15:29:17 -05:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>dependabot-fixDavid Lechner
6c373c302c build(deps): bump pyodide from 0.21.2 to 0.21.3 (#1144)
* build(deps): bump pyodide from 0.21.2 to 0.21.3

Bumps [pyodide](https://github.com/pyodide/pyodide) from 0.21.2 to 0.21.3.
- [Release notes](https://github.com/pyodide/pyodide/releases)
- [Commits](https://github.com/pyodide/pyodide/compare/0.21.2...0.21.3)

---
updated-dependencies:
- dependency-name: pyodide
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* [dependabot skip] Fix yarn.lock

* update patch for pyodide 0.21.3

* make use of new pyodide version export

* fix breaking change in loadPyodide indexURL

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot-fix <dependabot-fix@example.com>
Co-authored-by: David Lechner <david@pybricks.com>
2022-09-17 18:05:44 +00:00
David Lechner f24db4a89b implement cache bursting based on http header version
In 096eea7, we made use of APIs that require special http headers to be
configured on the server. This had a side effect of causing the
documentation iframe to not load because the browser would cache the
headers of the iframe index.html page.

We can work around this by providing a header version to do cache
bursting via a query parameter on this page.
2022-09-09 11:33:20 -05:00
David Lechner 76462a0f4a python-worker: enable offline use
This makes the required changes to use Pyodide and Python packages
offline and use a fixed version of the Python packages instead of
fetching the latest from PyPI.

There were a number of issues encountered with Pyodide webpack
compatibility that were fixed using `yarn patch`:
- https://github.com/pyodide/pyodide/pull/3080
- https://github.com/pyodide/pyodide/pull/3085
- https://github.com/pyodide/pyodide/issues/3086
- https://github.com/pyodide/pyodide/issues/3087

Issue: https://github.com/pybricks/pybricks-code/issues/932
2022-09-08 13:43:00 -05:00
David Lechner 30314db086 webpack: fix main.[hash].js not cached
This caused updates to not work if main.js was not in the browser
cache since it was being excluded from the service worker.

Issue: https://github.com/pybricks/support/issues/689
2022-07-28 11:44:59 -05:00
David Lechner c4b0a9a781 add version to docs path
This adds the @pybricks/ide-docs package version to the static path.
This should ensure that we don't get a cached older version in the
browser when the ide-docs package is updated.
2022-07-06 14:17:53 -05:00
David Lechner 096eea7077 editor: add basic intellisense
This adds basic intellisense for code completion and function signatures
using the Python `jedi` package running in a Pyodide environment.
2022-06-24 19:15:32 -05:00
David LechnerandDavid Lechner 9c95b25b87 yarn: update camelcase
This required converting the module that uses camelcase to mjs due to
breaking change in camelcase.
2022-06-06 11:57:48 -05:00
David LechnerandDavid Lechner 2f986cc80c fix breaking change for dotenv-expand 2022-06-03 10:23:25 -05:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>David Lechner
09c07affa3 build(deps): bump jest and @types/jest (#835)
* build(deps): bump jest and @types/jest

Bumps [jest](https://github.com/facebook/jest/tree/HEAD/packages/jest) and [@types/jest](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/jest). These dependencies needed to be updated together.

Updates `jest` from 27.5.1 to 28.1.0
- [Release notes](https://github.com/facebook/jest/releases)
- [Changelog](https://github.com/facebook/jest/blob/main/CHANGELOG.md)
- [Commits](https://github.com/facebook/jest/commits/v28.1.0/packages/jest)

Updates `@types/jest` from 27.4.1 to 28.1.0
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/jest)

---
updated-dependencies:
- dependency-name: jest
  dependency-type: direct:production
  update-type: version-update:semver-major
- dependency-name: "@types/jest"
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* fix breaking changes in jest 28

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: David Lechner <david@pybricks.com>
2022-06-02 18:53:21 +00:00
David LechnerandDavid Lechner 0362857c0d webpack: drop eslilnt baseConfig
This causes building with webpack to behave differently than building
without. Also since updating eslint packages, this now causes a build
error because it conflicts with the .eslintrc.js file with regard to
the "react" plugin.
2022-06-01 18:03:15 -05:00
David Lechner 9cdd102477 webpack: ignore warning about main.js size 2022-06-01 11:20:12 -05:00
David Lechner 4e88605b16 utils/customError: narrow type of name property
The name property is inherited from Error and has a type of string.
But our CustomError ensures that the name is restricted to the type
of T. This causes compiler errors, so we had to enable a babel plugin
to support it.
2022-05-20 16:46:17 -05:00
David Lechner a005992a21 fileStorage: use dexie-react-hooks
This lets the dexie-react-hooks library do more of the work for us
instead of having to make redux-sagas wrappers for everything.
2022-05-18 17:06:08 -05:00
David Lechner 3235d32dbb webpack: fix yarn build after 8ba4d49e
Something about commit 8ba4d49e caused a few extra babel modules to
trigger the ModuleScopePlugin guard. Example error:

    Failed to compile.

    Module not found: Error: You attempted to import /home/david/work/pybricks/pybricks-code/node_modules/@babel/runtime/regenerator/index.js which falls outside of the project src/ directory. Relative imports outside of src/ are not supported.
    You can either move it inside src/, or add a symlink to it from project's node_modules/.
2022-05-18 12:15:30 -05:00
David Lechner 65623f801d update for breaking blueprintjs style changes
it is no longer feasible to build the blueprintjs css ourselves, so we
just use all of the default variable values and override things using
selectors instead.
2022-05-11 18:13:36 -05:00
David Lechner 8d522b963a update blueprints
This had a breaking change with regard to sass compiling.
2022-05-10 22:15:28 -05:00
David Lechner df12c40802 drop craco
Since we aren't using react-scripts any more, craco doesn't do anything.
This merges the craco config into the config created by `yarn eject`.
2022-05-10 20:27:58 -05:00
David Lechner 10a3efc41f yarn eject 2022-05-10 17:52:37 -05:00