Skip to content

Commit

Permalink
Update all references to new repository
Browse files Browse the repository at this point in the history
  • Loading branch information
encode42 committed Sep 21, 2024
1 parent 948625f commit ebdfb13
Show file tree
Hide file tree
Showing 58 changed files with 484 additions and 1,373 deletions.
5 changes: 4 additions & 1 deletion changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
# 6.0.0
This update will break almost all existing applications!

The package has moved to `@nbsjs/core` to allow for future addons to the library.

Please carefully read through these changes and refer to the [examples](/examples).

### Changed
- The project has been rebranded from `NBS.js` to `nbs.js`.
- The project has moved from `@encode42/nbs.js` to `@nbsjs/core`.
- The project's repository has moved to [Note Block World](https://github.com/OpenNBS).
- The project is designated as a module by default.
- This update redesigns how classes and their properties are structured.
- Continuing what v5 started, multiple arrays tied to IDs/ticks have been transformed into an object.
Expand Down Expand Up @@ -42,7 +46,6 @@ Please carefully read through these changes and refer to the [examples](/example
- Moved all classes out of `util.ts` and into their own files.

### Added
- The `toJSON` and `fromJSON` functions. **Still in development!**
- The `Song#setTempo` and `Song#setTimePerTick` methods update each other when changed.
- The `SongLayers` class that provides helper methods and stores layers.
- The `LayerNotes` class that provides helper methods and stores notes.
Expand Down
2 changes: 1 addition & 1 deletion examples/design/instrument.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Instrument, Song } from "@encode42/nbs.js";
import { Instrument, Song } from "@nbsjs/core";

const instrument = new Instrument({
"name": "Sandple",
Expand Down
2 changes: 1 addition & 1 deletion examples/design/layer.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Layer } from "@encode42/nbs.js";
import { Layer } from "@nbsjs/core";

const layer = new Layer({
"name": "Demo"
Expand Down
2 changes: 1 addition & 1 deletion examples/design/note.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Note } from "@encode42/nbs.js";
import { Note } from "@nbsjs/core";

// Instrument ID 0 is always harp
new Note(0, {
Expand Down
2 changes: 1 addition & 1 deletion examples/design/song.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Layer, Song } from "@encode42/nbs.js";
import { Layer, Song } from "@nbsjs/core";

const song = new Song();
song.name = "Demo";
Expand Down
2 changes: 1 addition & 1 deletion examples/full/iterateNotes.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { readFileSync, writeFileSync } from "node:fs";
import { fromArrayBuffer, toArrayBuffer } from "@encode42/nbs.js";
import { fromArrayBuffer, toArrayBuffer } from "@nbsjs/core";

// Read a NBS file named "song.nbs"
const originalFile = readFileSync("song.nbs");
Expand Down
2 changes: 1 addition & 1 deletion examples/full/randomSong.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Song, toJSON } from "@encode42/nbs.js";
import { Song, toJSON } from "@nbsjs/core";

const song = new Song();
song.name = "Chaos";
Expand Down
2 changes: 1 addition & 1 deletion examples/simple/newSong.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Note, Song } from "@encode42/nbs.js";
import { Note, Song } from "@nbsjs/core";

// Create the song
const song = new Song();
Expand Down
2 changes: 1 addition & 1 deletion examples/simple/read.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { readFileSync } from "node:fs";
import { fromArrayBuffer } from "@encode42/nbs.js";
import { fromArrayBuffer } from "@nbsjs/core";

// Read a NBS file named "song.nbs"
const originalFile = readFileSync("song.nbs");
Expand Down
2 changes: 1 addition & 1 deletion examples/simple/write.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { writeFileSync } from "node:fs";
import { Song, toArrayBuffer } from "@encode42/nbs.js";
import { Song, toArrayBuffer } from "@nbsjs/core";

const song = new Song();

Expand Down
15 changes: 7 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,22 +1,21 @@
{
"type": "module",
"name": "@encode42/nbs.js",
"name": "@nbsjs/core",
"description": "Robust API for reading and writing OpenNBS files.",
"version": "6.0.0-beta2",
"version": "6.0.0",
"author": {
"name": "encode42",
"email": "me@encode42.dev",
"url": "https://encode42.dev"
"name": "OpenNBS",
"url": "https://opennbs.org"
},
"funding": {
"type": "github",
"url": "https://github.com/sponsors/encode42"
"url": "https://github.com/sponsors/OpenNBS"
},
"repository": {
"type": "git",
"url": "https://github.com/encode42/nbs.js.git"
"url": "https://github.com/OpenNBS/nbs.js.git"
},
"homepage": "https://encode42.github.io/nbs.js/",
"homepage": "https://opennbs.github.io/nbs.js/",
"license": "MIT",
"keywords": ["api", "minecraft", "nbs", "noteblock", "onbs"],
"main": "dist/index.js",
Expand Down
31 changes: 17 additions & 14 deletions public/docs/dev/assets/icons.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion public/docs/dev/assets/icons.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 5 additions & 4 deletions public/docs/dev/assets/main.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion public/docs/dev/assets/navigation.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion public/docs/dev/assets/search.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit ebdfb13

Please sign in to comment.