Merge remote-tracking branch 'origin/master' into dlech

This commit is contained in:
David Lechner
2022-09-13 14:24:43 -05:00
11 changed files with 505 additions and 729 deletions
+9 -9
View File
@@ -26,7 +26,7 @@
"@testing-library/react": "^12.1.5",
"@testing-library/user-event": "^14.4.3",
"@types/file-saver": "^2.0.5",
"@types/jest": "^28.1.8",
"@types/jest": "^29.0.1",
"@types/node": "^16.11.7",
"@types/react": "^16.14.24",
"@types/react-dom": "^16.9.14",
@@ -52,7 +52,7 @@
"case-sensitive-paths-webpack-plugin": "^2.4.0",
"copy-webpack-plugin": "^11.0.0",
"css-loader": "^6.5.1",
"css-minimizer-webpack-plugin": "^4.0.0",
"css-minimizer-webpack-plugin": "^4.1.0",
"dexie": "^3.2.2",
"dexie-observable": "^4.0.0-beta.13",
"dexie-react-hooks": "^1.1.1",
@@ -64,11 +64,11 @@
"fs-extra": "^10.0.0",
"html-webpack-plugin": "^5.5.0",
"identity-obj-proxy": "^3.0.0",
"jest": "^28.1.3",
"jest-environment-jsdom": "^29.0.2",
"jest": "^29.0.3",
"jest-environment-jsdom": "^29.0.3",
"jest-mock-extended": "^2.0.7",
"jest-resolve": "^29.0.0",
"jest-watch-typeahead": "^2.1.1",
"jest-watch-typeahead": "^2.2.0",
"jszip": "^3.10.1",
"license-webpack-plugin": "^3.0.0",
"mini-css-extract-plugin": "^2.6.1",
@@ -113,7 +113,7 @@
"tailwindcss": "^3.1.8",
"terser-webpack-plugin": "^5.3.6",
"typed-redux-saga": "^1.5.0",
"typescript": "~4.8.2",
"typescript": "~4.8.3",
"usehooks-ts": "^2.6.0",
"user-agent-data-types": "^0.3.0",
"web-vitals": "^3.0.1",
@@ -150,9 +150,9 @@
]
},
"devDependencies": {
"@typescript-eslint/eslint-plugin": "^5.36.2",
"@typescript-eslint/parser": "^5.36.2",
"eslint": "^8.23.0",
"@typescript-eslint/eslint-plugin": "^5.37.0",
"@typescript-eslint/parser": "^5.37.0",
"eslint": "^8.23.1",
"eslint-config-prettier": "^8.5.0",
"eslint-config-react-app": "^7.0.1",
"eslint-config-typed-fp": "^2.0.1",
+1 -1
View File
@@ -20,7 +20,7 @@ type State = ReturnType<typeof reducers>;
test('initial state', () => {
expect(reducers(undefined, {} as AnyAction)).toMatchInlineSnapshot(`
Object {
{
"checkingForUpdate": false,
"hasUnresolvedInstallPrompt": false,
"isServiceWorkerRegistered": false,
+1 -1
View File
@@ -24,7 +24,7 @@ type State = ReturnType<typeof reducers>;
test('initial state', () => {
expect(reducers(undefined, {} as AnyAction)).toMatchInlineSnapshot(`
Object {
{
"connection": "ble.connection.state.disconnected",
"deviceBatteryCharging": false,
"deviceFirmwareVersion": "",
+1 -1
View File
@@ -291,7 +291,7 @@ describe('handleExplorerCreateNewFile', () => {
saga.put(newFileWizardDidAccept('test', pythonFileExtension, Hub.Technic));
await expect(saga.take()).resolves.toMatchInlineSnapshot(`
Object {
{
"contents": "from pybricks.hubs import TechnicHub
from pybricks.pupdevices import Motor
from pybricks.parameters import Button, Color, Direction, Port, Stop
+1 -1
View File
@@ -9,7 +9,7 @@ type State = ReturnType<typeof reducers>;
test('initial state', () => {
expect(reducers(undefined, {} as AnyAction)).toMatchInlineSnapshot(`
Object {
{
"isInitialized": false,
}
`);
+3 -3
View File
@@ -15,13 +15,13 @@ type State = ReturnType<typeof reducers>;
test('initial state', () => {
expect(reducers(undefined, {} as AnyAction)).toMatchInlineSnapshot(`
Object {
{
"flashing": false,
"installPybricksDialog": Object {
"installPybricksDialog": {
"isOpen": false,
},
"progress": null,
"restoreOfficialDialog": Object {
"restoreOfficialDialog": {
"isOpen": false,
},
}
+36 -36
View File
@@ -110,12 +110,12 @@ describe('flashFirmware', () => {
action = await saga.take();
expect(action).toMatchInlineSnapshot(`
Object {
{
"abiVersion": 5,
"options": Array [
"options": [
"-mno-unicode",
],
"script": "print(\\"test\\")",
"script": "print("test")",
"type": "mpy.action.compile",
}
`);
@@ -636,12 +636,12 @@ describe('flashFirmware', () => {
action = await saga.take();
expect(action).toMatchInlineSnapshot(`
Object {
{
"abiVersion": 5,
"options": Array [
"options": [
"-mno-unicode",
],
"script": "print(\\"test\\")",
"script": "print("test")",
"type": "mpy.action.compile",
}
`);
@@ -784,12 +784,12 @@ describe('flashFirmware', () => {
action = await saga.take();
expect(action).toMatchInlineSnapshot(`
Object {
{
"abiVersion": 5,
"options": Array [
"options": [
"-mno-unicode",
],
"script": "print(\\"test\\")",
"script": "print("test")",
"type": "mpy.action.compile",
}
`);
@@ -883,12 +883,12 @@ describe('flashFirmware', () => {
action = await saga.take();
expect(action).toMatchInlineSnapshot(`
Object {
{
"abiVersion": 5,
"options": Array [
"options": [
"-mno-unicode",
],
"script": "print(\\"test\\")",
"script": "print("test")",
"type": "mpy.action.compile",
}
`);
@@ -991,12 +991,12 @@ describe('flashFirmware', () => {
action = await saga.take();
expect(action).toMatchInlineSnapshot(`
Object {
{
"abiVersion": 5,
"options": Array [
"options": [
"-mno-unicode",
],
"script": "print(\\"test\\")",
"script": "print("test")",
"type": "mpy.action.compile",
}
`);
@@ -1139,12 +1139,12 @@ describe('flashFirmware', () => {
action = await saga.take();
expect(action).toMatchInlineSnapshot(`
Object {
{
"abiVersion": 5,
"options": Array [
"options": [
"-mno-unicode",
],
"script": "print(\\"test\\")",
"script": "print("test")",
"type": "mpy.action.compile",
}
`);
@@ -1273,12 +1273,12 @@ describe('flashFirmware', () => {
let action = await saga.take();
expect(action).toMatchInlineSnapshot(`
Object {
{
"abiVersion": 5,
"options": Array [
"options": [
"-mno-unicode",
],
"script": "print(\\"test\\")",
"script": "print("test")",
"type": "mpy.action.compile",
}
`);
@@ -1521,12 +1521,12 @@ describe('flashFirmware', () => {
let action = await saga.take();
expect(action).toMatchInlineSnapshot(`
Object {
{
"abiVersion": 5,
"options": Array [
"options": [
"-mno-unicode",
],
"script": "print(\\"test\\")",
"script": "print("test")",
"type": "mpy.action.compile",
}
`);
@@ -1582,12 +1582,12 @@ describe('flashFirmware', () => {
let action = await saga.take();
expect(action).toMatchInlineSnapshot(`
Object {
{
"abiVersion": 5,
"options": Array [
"options": [
"-mno-unicode",
],
"script": "print(\\"test\\")",
"script": "print("test")",
"type": "mpy.action.compile",
}
`);
@@ -1644,12 +1644,12 @@ describe('flashFirmware', () => {
let action = await saga.take();
expect(action).toMatchInlineSnapshot(`
Object {
{
"abiVersion": 5,
"options": Array [
"options": [
"-mno-unicode",
],
"script": "print(\\"test\\")",
"script": "print("test")",
"type": "mpy.action.compile",
}
`);
@@ -1709,12 +1709,12 @@ describe('flashFirmware', () => {
let action = await saga.take();
expect(action).toMatchInlineSnapshot(`
Object {
{
"abiVersion": 5,
"options": Array [
"options": [
"-mno-unicode",
],
"script": "print(\\"test\\")",
"script": "print("test")",
"type": "mpy.action.compile",
}
`);
@@ -1811,12 +1811,12 @@ describe('flashFirmware', () => {
action = await saga.take();
expect(action).toMatchInlineSnapshot(`
Object {
{
"abiVersion": 5,
"options": Array [
"options": [
"-mno-unicode",
],
"script": "print(\\"test\\")",
"script": "print("test")",
"type": "mpy.action.compile",
}
`);
+1 -1
View File
@@ -17,7 +17,7 @@ type State = ReturnType<typeof reducers>;
test('initial state', () => {
expect(reducers(undefined, {} as AnyAction)).toMatchInlineSnapshot(`
Object {
{
"downloadProgress": null,
"mpyAbiVersion": 6,
"runtime": "hub.runtime.disconnected",
+1 -1
View File
@@ -19,7 +19,7 @@ type State = ReturnType<typeof reducers>;
test('initial state', () => {
expect(reducers(undefined, {} as AnyAction)).toMatchInlineSnapshot(`
Object {
{
"connection": "bootloader.connection.disconnected",
}
`);
+2 -2
View File
@@ -28,9 +28,9 @@ test('compiler error works', async () => {
expect(didFailToCompile.matches(action)).toBeTruthy();
const { err } = action as ReturnType<typeof didFailToCompile>;
expect(err).toMatchInlineSnapshot(`
Array [
[
"Traceback (most recent call last):",
" File \\"main.py\\", line 1",
" File "main.py", line 1",
"SyntaxError: invalid syntax",
]
`);
+449 -673
View File
File diff suppressed because it is too large Load Diff