Skip to content

Commit

Permalink
fix: update GitHub links with /scratchfoundation/
Browse files Browse the repository at this point in the history
  • Loading branch information
cwillisf committed Sep 28, 2023
1 parent 613e5cc commit 802d211
Show file tree
Hide file tree
Showing 10 changed files with 26 additions and 27 deletions.
10 changes: 5 additions & 5 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@ The development of Scratch is an ongoing process, and we love to have people in

* **Documenting bugs**
* If you've identified a bug in Scratch you should first check to see if it's been filed as an issue, if not you can file one. Make sure you follow the issue template.
* It's important that we can consistently reproduce issues. When writing an issue, be sure to follow our [reproduction step guidelines](https://github.com/LLK/scratch-gui/wiki/Writing-good-repro-steps).
* It's important that we can consistently reproduce issues. When writing an issue, be sure to follow our [reproduction step guidelines](https://github.com/scratchfoundation/scratch-gui/wiki/Writing-good-repro-steps).
* Some issues are marked "Needs Repro". Adding a comment with good reproduction steps to those issues is a great way to help.
* If you don't have an issue in mind already, you can look through the [Bugs & Glitches forum.](https://scratch.mit.edu/discuss/3/) Look for users reporting problems, reproduce the problem yourself, and file new issues following our guidelines.
* If you don't have an issue in mind already, you can look through the [Bugs & Glitches forum.](https://scratch.mit.edu/discuss/3/) Look for users reporting problems, reproduce the problem yourself, and file new issues following our guidelines.

* **Fixing bugs**
* You can request to fix a bug in a comment on the issue if you at mention the repo coordinator, who for this repo is @ericrosenbaum.
* If the issue is marked "Help Wanted" you can go ahead and start working on it!
* **We will only accept Pull Requests for bugs that have an issue filed that has a priority label**
* **We will only accept Pull Requests for bugs that have an issue filed that has a priority label**
* If you're interested in fixing a bug with no issue, file the issue first and wait for it to have a priority added to it.

* We are not looking for Pull Requests ("PR") for every issue and may deny a PR if it doesn't fit our criteria.
* We are far more likely to accept a PR if it is for an issue marked with Help Wanted.
* We will not accept PRs for issues marked with "Needs Discussion" or "Needs Design."
Expand Down Expand Up @@ -60,7 +60,7 @@ We welcome suggestions! If you want to suggest a feature, please post in our [su

### Other resources
Beyond this repo, there are also some other resources that you might want to take a look at:
* [Community Guidelines](https://github.com/LLK/scratch-www/wiki/Community-Guidelines) (we find it important to maintain a constructive and welcoming community, just like on Scratch)
* [Community Guidelines](https://github.com/scratchfoundation/scratch-www/wiki/Community-Guidelines) (we find it important to maintain a constructive and welcoming community, just like on Scratch)
* [Open Source forum](https://scratch.mit.edu/discuss/49/) on Scratch
* [Suggestions forum](https://scratch.mit.edu/discuss/1/) on Scratch
* [Bugs & Glitches forum](https://scratch.mit.edu/discuss/3/) on Scratch
11 changes: 5 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
## scratch-vm
#### Scratch VM is a library for representing, running, and maintaining the state of computer programs written using [Scratch Blocks](https://github.com/LLK/scratch-blocks).
#### Scratch VM is a library for representing, running, and maintaining the state of computer programs written using [Scratch Blocks](https://github.com/scratchfoundation/scratch-blocks).

[![Build Status](https://travis-ci.org/LLK/scratch-vm.svg?branch=develop)](https://travis-ci.org/LLK/scratch-vm)
[![Coverage Status](https://coveralls.io/repos/github/LLK/scratch-vm/badge.svg?branch=develop)](https://coveralls.io/github/LLK/scratch-vm?branch=develop)
[![CI/CD](https://github.com/scratchfoundation/scratch-vm/actions/workflows/ci-cd.yml/badge.svg)](https://github.com/scratchfoundation/scratch-vm/actions/workflows/ci-cd.yml)

## Installation
This requires you to have Git and Node.js installed.
Expand All @@ -13,15 +12,15 @@ npm install scratch-vm
```
To set up a development environment to edit scratch-vm yourself:
```bash
git clone https://github.com/LLK/scratch-vm.git
git clone https://github.com/scratchfoundation/scratch-vm.git
cd scratch-vm
npm install
```

## Development Server
This requires Node.js to be installed.

For convenience, we've included a development server with the VM. This is sometimes useful when running in an environment that's loading remote resources (e.g., SVGs from the Scratch server). If you would like to use your modified VM with the full Scratch 3.0 GUI, [follow the instructions to link the VM to the GUI](https://github.com/LLK/scratch-gui/wiki/Getting-Started).
For convenience, we've included a development server with the VM. This is sometimes useful when running in an environment that's loading remote resources (e.g., SVGs from the Scratch server). If you would like to use your modified VM with the full Scratch 3.0 GUI, [follow the instructions to link the VM to the GUI](https://github.com/scratchfoundation/scratch-gui/wiki/Getting-Started).

## Running the Development Server
Open a Command Prompt or Terminal in the repository and run:
Expand Down Expand Up @@ -64,7 +63,7 @@ vm.start();
## Abstract Syntax Tree

#### Overview
The Virtual Machine constructs and maintains the state of an [Abstract Syntax Tree](https://en.wikipedia.org/wiki/Abstract_syntax_tree) (AST) by listening to events emitted by the [scratch-blocks](https://github.com/LLK/scratch-blocks) workspace via the `blockListener`. Each target (code-running object, for example, a sprite) keeps an AST for its blocks. At any time, the current state of an AST can be viewed by inspecting the `vm.runtime.targets[...].blocks` object.
The Virtual Machine constructs and maintains the state of an [Abstract Syntax Tree](https://en.wikipedia.org/wiki/Abstract_syntax_tree) (AST) by listening to events emitted by the [scratch-blocks](https://github.com/scratchfoundation/scratch-blocks) workspace via the `blockListener`. Each target (code-running object, for example, a sprite) keeps an AST for its blocks. At any time, the current state of an AST can be viewed by inspecting the `vm.runtime.targets[...].blocks` object.

#### Anatomy of a Block
The VM's block representation contains all the important information for execution and storage. Here's an example representing the "when key pressed" script on a workspace:
Expand Down
2 changes: 1 addition & 1 deletion docs/extensions.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ ways.
## Defining an Extension

Scratch extensions are defined as a single Javascript class which accepts either a reference to the Scratch
[VM](https://github.com/llk/scratch-vm) runtime or a "runtime proxy" which handles communication with the Scratch VM
[VM](https://github.com/scratchfoundation/scratch-vm) runtime or a "runtime proxy" which handles communication with the Scratch VM
across a well defined worker boundary (i.e. the sandbox).

```js
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
"description": "Virtual Machine for Scratch 3.0",
"author": "Massachusetts Institute of Technology",
"license": "BSD-3-Clause",
"homepage": "https://github.com/LLK/scratch-vm#readme",
"homepage": "https://github.com/scratchfoundation/scratch-vm#readme",
"repository": {
"type": "git",
"url": "https://github.com/LLK/scratch-vm.git",
"url": "https://github.com/scratchfoundation/scratch-vm.git",
"sha": "6c2df37bed2cbda63a9de514ceb021e67f10a86a"
},
"main": "./dist/node/scratch-vm.js",
Expand Down
2 changes: 1 addition & 1 deletion src/blocks/scratch3_looks.js
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ class Scratch3LooksBlocks {

// Non-integers should be rounded to 2 decimal places (no more, no less), unless they're small enough that
// rounding would display them as 0.00. This matches 2.0's behavior:
// https://github.com/LLK/scratch-flash/blob/2e4a402ceb205a042887f54b26eebe1c2e6da6c0/src/scratch/ScratchSprite.as#L579-L585
// https://github.com/scratchfoundation/scratch-flash/blob/2e4a402ceb205a042887f54b26eebe1c2e6da6c0/src/scratch/ScratchSprite.as#L579-L585
if (typeof text === 'number' &&
Math.abs(text) >= 0.01 && text % 1 !== 0) {
text = text.toFixed(2);
Expand Down
4 changes: 2 additions & 2 deletions src/extensions/scratch3_microbit/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const blockIconURI = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAABQCAYA

/**
* Enum for micro:bit BLE command protocol.
* https://github.com/LLK/scratch-microbit-firmware/blob/master/protocol.md
* https://github.com/scratchfoundation/scratch-microbit-firmware/blob/master/protocol.md
* @readonly
* @enum {number}
*/
Expand Down Expand Up @@ -46,7 +46,7 @@ const BLEDataStoppedError = 'micro:bit extension stopped receiving data';

/**
* Enum for micro:bit protocol.
* https://github.com/LLK/scratch-microbit-firmware/blob/master/protocol.md
* https://github.com/scratchfoundation/scratch-microbit-firmware/blob/master/protocol.md
* @readonly
* @enum {string}
*/
Expand Down
2 changes: 1 addition & 1 deletion src/extensions/scratch3_text2speech/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ class Scratch3Text2SpeechBlocks {
*
* SCRATCH LOCALE
* Set by the editor, and used to store the language state in the project.
* Listed in l10n: https://github.com/LLK/scratch-l10n/blob/master/src/supported-locales.js
* Listed in l10n: https://github.com/scratchfoundation/scratch-l10n/blob/master/src/supported-locales.js
* SUPPORTED LOCALE
* A Scratch locale that has a corresponding extension locale.
* EXTENSION LOCALE
Expand Down
6 changes: 3 additions & 3 deletions src/serialization/sb2_specmap.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@
* Keep this up-to-date as 3.0 blocks are renamed, changed, etc.
* Originally this was generated largely by a hand-guided scripting process.
* The relevant data lives here:
* https://github.com/LLK/scratch-flash/blob/master/src/Specs.as
* https://github.com/scratchfoundation/scratch-flash/blob/master/src/Specs.as
* (for the old opcode and argument order).
* and here:
* https://github.com/LLK/scratch-blocks/tree/develop/blocks_vertical
* https://github.com/scratchfoundation/scratch-blocks/tree/develop/blocks_vertical
* (for the new opcodes and argument names).
* and here:
* https://github.com/LLK/scratch-blocks/blob/develop/tests/
* https://github.com/scratchfoundation/scratch-blocks/blob/develop/tests/
* (for the shadow blocks created for each block).
* I started with the `commands` array in Specs.as, and discarded irrelevant
* properties. By hand, I matched the opcode name to the 3.0 opcode.
Expand Down
10 changes: 5 additions & 5 deletions src/serialization/sb3.js
Original file line number Diff line number Diff line change
Expand Up @@ -351,16 +351,16 @@ const serializeCostume = function (costume) {

obj.bitmapResolution = costumeToSerialize.bitmapResolution;
obj.dataFormat = costumeToSerialize.dataFormat.toLowerCase();

obj.assetId = costumeToSerialize.assetId;

// serialize this property with the name 'md5ext' because that's
// what it's actually referring to. TODO runtime objects need to be
// updated to actually refer to this as 'md5ext' instead of 'md5'
// but that change should be made carefully since it is very
// pervasive
obj.md5ext = costumeToSerialize.md5;

obj.rotationCenterX = costumeToSerialize.rotationCenterX;
obj.rotationCenterY = costumeToSerialize.rotationCenterY;

Expand All @@ -375,7 +375,7 @@ const serializeCostume = function (costume) {
const serializeSound = function (sound) {
const obj = Object.create(null);
obj.name = sound.name;

const soundToSerialize = sound.broken || sound;

obj.assetId = soundToSerialize.assetId;
Expand Down Expand Up @@ -1115,7 +1115,7 @@ const deserializeMonitor = function (monitorData, runtime, targets, extensions)
// This will be undefined for extension blocks
const monitorBlockInfo = runtime.monitorBlockInfo[monitorData.opcode];

// Due to a bug (see https://github.com/LLK/scratch-vm/pull/2322), renamed list monitors may have been serialized
// Due to a bug (see https://github.com/scratchfoundation/scratch-vm/pull/2322), renamed list monitors may have been serialized
// with an outdated/incorrect LIST parameter. Fix it up to use the current name of the actual corresponding list.
if (monitorData.opcode === 'data_listcontents') {
const listTarget = monitorData.targetId ?
Expand Down
2 changes: 1 addition & 1 deletion test/unit/blocks_procedures.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ test('getPrimitives', t => {
t.end();
});

// Originally inspired by https://github.com/LLK/scratch-gui/issues/809
// Originally inspired by https://github.com/scratchfoundation/scratch-gui/issues/809
test('calling a custom block with no definition does not throw', t => {
const args = {
mutation: {
Expand Down

0 comments on commit 802d211

Please sign in to comment.