porffor 0.57.13 → 0.57.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -5157,6 +5157,9 @@ const generateSwitch = (scope, decl) => {
5157
5157
  if (defaultCase != -1) {
5158
5158
  // move default case to last
5159
5159
  cases.push(cases.splice(defaultCase, 1)[0]);
5160
+ } else {
5161
+ // make empty default case
5162
+ cases.push({ test: null, consequent: [] });
5160
5163
  }
5161
5164
 
5162
5165
  for (let i = 0; i < cases.length; i++) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "porffor",
3
3
  "description": "An ahead-of-time JavaScript compiler",
4
- "version": "0.57.13",
4
+ "version": "0.57.15",
5
5
  "author": "Oliver Medhurst <honk@goose.icu>",
6
6
  "license": "MIT",
7
7
  "scripts": {},
package/runtime/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import fs from 'node:fs';
3
- globalThis.version = '0.57.13';
3
+ globalThis.version = '0.57.15';
4
4
 
5
5
  // deno compat
6
6
  if (typeof process === 'undefined' && typeof Deno !== 'undefined') {
package/foo.js DELETED
@@ -1,10 +0,0 @@
1
- const wow = x => {
2
- switch (x) {
3
- case 1:
4
- return true;
5
- }
6
-
7
- return false;
8
- };
9
-
10
- console.log(wow(1337));