From 452d84c06a4b1dfa3a63776ad08f3f1101f0f1ee Mon Sep 17 00:00:00 2001 From: Danny Peck Date: Tue, 21 Apr 2026 10:09:39 -0400 Subject: [PATCH 1/9] non-production: move backdraft-app to github packages --- .npmrc | 2 ++ README.md | 32 ++++++++++++++++++++++---------- package.json | 4 ++-- 3 files changed, 26 insertions(+), 12 deletions(-) create mode 100644 .npmrc diff --git a/.npmrc b/.npmrc new file mode 100644 index 0000000..37838e2 --- /dev/null +++ b/.npmrc @@ -0,0 +1,2 @@ +//npm.pkg.github.com/:_authToken=${GITHUB_TOKEN} +@invoca:registry=https://npm.pkg.github.com diff --git a/README.md b/README.md index b811a20..3d9bc62 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ Written as a plugin-based framework, where the DataTables integration is a plugi ## Install ``` -npm install backdraft-app +npm install @invoca/backdraft-app ``` ## Usage @@ -15,7 +15,7 @@ First, define a new Backdraft app: // app.js import MainRouter from "./main_router"; -import App from "backdraft-app/src/app"; +import App from "@invoca/backdraft-app/src/app"; class TableExample extends App { activate($el) { @@ -40,7 +40,7 @@ Define the various components of your app: // main_router.js import IndexView from "./views/index_view"; -import Router from "backdraft-app/src/router"; +import Router from "@invoca/backdraft-app/src/router"; export default class MainRouter extends Router { get routes() { @@ -56,7 +56,7 @@ export default class MainRouter extends Router { }; // models/book.js -import Model from "backdraft-app/src/model"; +import Model from "@invoca/backdraft-app/src/model"; export default class Book extends Model { }; @@ -64,7 +64,7 @@ export default class Book extends Model { // collections/books.js import Book from "../models/book"; -import Collection from "backdraft-app/src/collection"; +import Collection from "@invoca/backdraft-app/src/collection"; export default class Books extends Collection { get model() { @@ -75,7 +75,7 @@ export default class Books extends Collection { // views/book_table_view.js import BookRowView from "./book_row_view"; -import LocalDataTable from "backdraft-app/src/data_table/local_data_table"; +import LocalDataTable from "@invoca/backdraft-app/src/data_table/local_data_table"; export default class BookTableView extends LocalDataTable { get rowClass() { @@ -88,7 +88,7 @@ export default class BookTableView extends LocalDataTable { }; // views/book_row_view.js -import Row from "backdraft-app/src/data_table/row"; +import Row from "@invoca/backdraft-app/src/data_table/row"; export default class BookRowView extends Row { get columns() { @@ -108,7 +108,7 @@ Now create the view that pulls all the pieces together: import BookTableView from "./book_table_view"; import Books from "../collections/books"; -import View from "backdraft-app/src/view"; +import View from "@invoca/backdraft-app/src/view"; export default class IndexView extends View { render() { @@ -317,7 +317,19 @@ Thank you to all [the contributors](https://github.com/invoca/backdraft/contribu ### Publishing - admins -To publish a new version to NPM (https://www.npmjs.com/package/backdraft-app), do the following +To publish a new version to the Invoca GitHub Packages npm registry, do the following: + +#### One-time setup + +Add a GitHub personal access token with `write:packages` scope to your shell environment (e.g. `~/.zshrc` or `~/.bashrc`): + +```sh +export GITHUB_TOKEN= +``` + +Create a token at https://github.com/settings/tokens. + +#### Publishing 1. Ensure the following are complete: * Tested @@ -328,7 +340,7 @@ To publish a new version to NPM (https://www.npmjs.com/package/backdraft-app), d * creates commit with version change * tags the commit with the version * pushes the commit and tag to Github - * builds and publishes the node module + * publishes the package to fury.io 3. If on a branch, ensure this version gets **merged to master** diff --git a/package.json b/package.json index 0a828ef..bbc766e 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "backdraft-app", + "name": "@invoca/backdraft-app", "version": "1.3.8", "description": "Plugin-based UI application framework built on top of and extending Backbone to create single page apps", "files": [ @@ -13,7 +13,7 @@ "specs_without_eslint": "karma start --single-run", "dev": "yarn run eslint; karma start", "examples": "grunt examples", - "postversion": "git push --tags && yarn publish --new-version $npm_package_version && git push && echo \"Successfully released version $npm_package_version!\"" + "postversion": "git push --tags && npm publish && git push && echo \"Successfully released version $npm_package_version!\"" }, "author": "Invoca", "license": "MIT", From 260833851dfadee50c3c4a262a76ec71e6931c0f Mon Sep 17 00:00:00 2001 From: Danny Peck Date: Tue, 21 Apr 2026 10:12:19 -0400 Subject: [PATCH 2/9] non-production: add env var --- .github/workflows/pipeline.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/pipeline.yml b/.github/workflows/pipeline.yml index ed2163b..9a9fbc0 100644 --- a/.github/workflows/pipeline.yml +++ b/.github/workflows/pipeline.yml @@ -13,4 +13,6 @@ jobs: with: node-version: '10' - run: npm install + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: yarn run specs_without_eslint From af18ba29bea0174855091e37163622e32a572c8b Mon Sep 17 00:00:00 2001 From: Danny Peck Date: Tue, 21 Apr 2026 10:15:05 -0400 Subject: [PATCH 3/9] chore: update readme --- README.md | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 3d9bc62..0208658 100644 --- a/README.md +++ b/README.md @@ -81,7 +81,7 @@ export default class BookTableView extends LocalDataTable { get rowClass() { return BookRowView; } - + get paginate() { return false; } @@ -114,15 +114,15 @@ export default class IndexView extends View { render() { const collection = new Books(); const data = []; - + // fake data for (let iter = 0; iter < 10; ++iter) { data.push({ name : `Book ${iter + 1}` }); } - + collection.add(data); const table = new BookTableView({ collection }); - + this.$el.html(table.render().$el); return this; } @@ -149,7 +149,7 @@ Finally, in an HTML page that loads the above scripts, activate the app at load ## Legacy Usage The legacy usage uses the `Backdraft` object to define the components of the application. - + First, define a new Backdraft app and what plugins it will use: ```javascript @@ -293,14 +293,14 @@ Run the yarn `dev` script from the main directory to have the source and test fi Run the `specs` script to run all the tests and exit yarn run specs - + Use the following two ENV variables to target specific tests: - `SPEC_FILTER` - target specific tests via [karma-jasmine's --grep feature](https://github.com/karma-runner/karma-jasmine/blob/4f70e5e77831998dc252b2f7ad1353398144588b/README.md#configuration). - + - `SPEC_FILE_FILTER` - target specific tests by file path. This value must be a regex. For example: - `SPEC_FILE_FILTER="/data_table.*_spec.js/" yarn run specs` + `SPEC_FILE_FILTER="/data_table.*_spec.js/" yarn run specs` See all available commands with: @@ -317,6 +317,10 @@ Thank you to all [the contributors](https://github.com/invoca/backdraft/contribu ### Publishing - admins +`@invoca/backdraft-app` is published to the Invoca GitHub Packages npm registry: + +https://github.com/Invoca/backdraft/pkgs/npm/backdraft-app + To publish a new version to the Invoca GitHub Packages npm registry, do the following: #### One-time setup From 79d6636319eedd9839ad34108839d49a59e50275 Mon Sep 17 00:00:00 2001 From: Danny Peck Date: Tue, 21 Apr 2026 18:20:42 -0400 Subject: [PATCH 4/9] chore: bump jquery version --- package.json | 2 +- yarn.lock | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index bbc766e..06489d9 100644 --- a/package.json +++ b/package.json @@ -33,7 +33,7 @@ "grunt-contrib-watch": "^1.0.0", "grunt-webpack": "^3.0.2", "jasmine-core": "^2.99.1", - "jquery": "jquery/jquery#1.10.2", + "jquery": "1.10.2", "jquery-deparam": "0.4.2", "karma": "^2.0.0", "karma-cli": "^1.0.1", diff --git a/yarn.lock b/yarn.lock index 4e9b82e..32d7f77 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3467,9 +3467,10 @@ jquery-deparam@0.4.2: version "0.4.2" resolved "https://registry.yarnpkg.com/jquery-deparam/-/jquery-deparam-0.4.2.tgz#e4fdcfc2dad11af184250c6057b04b9363dcdcf4" -jquery@jquery/jquery#1.10.2: - version "1.10.2" - resolved "https://codeload.github.com/jquery/jquery/tar.gz/16b079b164d62bd807c612806842a13bf9b04d17" +jquery@1.10.2: + version "1.11.0" + resolved "https://registry.yarnpkg.com/jquery/-/jquery-1.11.0.tgz#c67ceee19b403650d682adcf39d5c9009814d949" + integrity sha512-hfN15gXeUqsx3HxHrHYzVzfWayuGwrCMONhvexiaIV/aUlLqC8Im+G7KrKTPkHzD7HCgeAaQ7VeHRn3Dlve8Hg== js-tokens@^3.0.0, js-tokens@^3.0.2: version "3.0.2" From 1fa49e4045e21a4eb2778b9320084627e60d5d70 Mon Sep 17 00:00:00 2001 From: Danny Peck Date: Tue, 21 Apr 2026 18:31:18 -0400 Subject: [PATCH 5/9] chore: bump jquery version --- package.json | 2 +- yarn.lock | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 06489d9..bbc766e 100644 --- a/package.json +++ b/package.json @@ -33,7 +33,7 @@ "grunt-contrib-watch": "^1.0.0", "grunt-webpack": "^3.0.2", "jasmine-core": "^2.99.1", - "jquery": "1.10.2", + "jquery": "jquery/jquery#1.10.2", "jquery-deparam": "0.4.2", "karma": "^2.0.0", "karma-cli": "^1.0.1", diff --git a/yarn.lock b/yarn.lock index 32d7f77..4e9b82e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3467,10 +3467,9 @@ jquery-deparam@0.4.2: version "0.4.2" resolved "https://registry.yarnpkg.com/jquery-deparam/-/jquery-deparam-0.4.2.tgz#e4fdcfc2dad11af184250c6057b04b9363dcdcf4" -jquery@1.10.2: - version "1.11.0" - resolved "https://registry.yarnpkg.com/jquery/-/jquery-1.11.0.tgz#c67ceee19b403650d682adcf39d5c9009814d949" - integrity sha512-hfN15gXeUqsx3HxHrHYzVzfWayuGwrCMONhvexiaIV/aUlLqC8Im+G7KrKTPkHzD7HCgeAaQ7VeHRn3Dlve8Hg== +jquery@jquery/jquery#1.10.2: + version "1.10.2" + resolved "https://codeload.github.com/jquery/jquery/tar.gz/16b079b164d62bd807c612806842a13bf9b04d17" js-tokens@^3.0.0, js-tokens@^3.0.2: version "3.0.2" From 079a580131449f0eadd3c4a52df9e823bd0071fe Mon Sep 17 00:00:00 2001 From: Danny Peck Date: Tue, 21 Apr 2026 18:32:17 -0400 Subject: [PATCH 6/9] chore: bump jquery version --- .github/workflows/pipeline.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pipeline.yml b/.github/workflows/pipeline.yml index 9a9fbc0..6a5feee 100644 --- a/.github/workflows/pipeline.yml +++ b/.github/workflows/pipeline.yml @@ -12,7 +12,7 @@ jobs: - uses: actions/setup-node@v2 with: node-version: '10' - - run: npm install + - run: yarn install env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: yarn run specs_without_eslint From ba2931fee6ca287305cf7e1ca410303c82db577c Mon Sep 17 00:00:00 2001 From: Danny Peck Date: Tue, 21 Apr 2026 18:33:08 -0400 Subject: [PATCH 7/9] chore: bump jquery version --- .github/workflows/pipeline.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/pipeline.yml b/.github/workflows/pipeline.yml index 6a5feee..391496f 100644 --- a/.github/workflows/pipeline.yml +++ b/.github/workflows/pipeline.yml @@ -16,3 +16,5 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: yarn run specs_without_eslint + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 0936d6301233879ac00a524b2c0b43fb6b442d3c Mon Sep 17 00:00:00 2001 From: Danny Peck Date: Tue, 21 Apr 2026 18:42:04 -0400 Subject: [PATCH 8/9] chore: bump jquery version --- .github/workflows/pipeline.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/pipeline.yml b/.github/workflows/pipeline.yml index 391496f..5e5887d 100644 --- a/.github/workflows/pipeline.yml +++ b/.github/workflows/pipeline.yml @@ -18,3 +18,4 @@ jobs: - run: yarn run specs_without_eslint env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + OPENSSL_CONF: /dev/null From ed8ec8b717c1fb846eb131fe7c5ba8f214a5ccf3 Mon Sep 17 00:00:00 2001 From: Danny Peck Date: Tue, 21 Apr 2026 18:45:02 -0400 Subject: [PATCH 9/9] Apply suggestions from code review Co-authored-by: Danny Peck --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 0208658..8917921 100644 --- a/README.md +++ b/README.md @@ -344,7 +344,7 @@ Create a token at https://github.com/settings/tokens. * creates commit with version change * tags the commit with the version * pushes the commit and tag to Github - * publishes the package to fury.io + * publishes the package to GitHub packages 3. If on a branch, ensure this version gets **merged to master**