Skip to content

Commit 672cd9c

Browse files
committed
Refactor terminology from "plugin" to "package" in documentation and code examples
1 parent 435a780 commit 672cd9c

File tree

7 files changed

+27
-33
lines changed

7 files changed

+27
-33
lines changed

CHANGELOG.md

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,17 +19,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1919

2020
### Security
2121

22-
## [0.0.2] - 2025-10-06
23-
24-
### Fixed
25-
26-
- Corrected usage instructions in README for clarity
27-
28-
## [0.0.1] - 2025-09-16
22+
## [0.0.1] - 2025-10-06
2923

3024
### Added
3125

32-
- Initial release of the Dataform Plugin
26+
- Initial release of the Dataform Package
3327
- Automatic BigQuery reservation assignment based on action names
3428
- Support for high-priority, low-priority, and on-demand reservations
3529
- Comprehensive test suite with Jest

CONTRIBUTING.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ We welcome contributions to the Dataform Plugin! This document provides guidelin
77
1. **Clone the repository:**
88

99
```bash
10-
git clone https://github.com/masthead-data/dataform-plugin.git
11-
cd dataform-plugin
10+
git clone https://github.com/masthead-data/dataform-package.git
11+
cd dataform-package
1212
```
1313

1414
2. **Install dependencies:**
@@ -32,8 +32,8 @@ We welcome contributions to the Dataform Plugin! This document provides guidelin
3232
## Project Structure
3333

3434
```filetree
35-
dataform-plugin/
36-
├── index.js # Main plugin code
35+
dataform-package/
36+
├── index.js # Main package code
3737
├── test/
3838
│ └── index.test.js # Test suite
3939
├── package.json # Package configuration
@@ -133,4 +133,4 @@ If you have questions about contributing, please:
133133
2. Open a new issue for discussion
134134
3. Contact the maintainers
135135

136-
Thank you for contributing to the Dataform Reservation Plugin!
136+
Thank you for contributing to the Dataform Plugin!

README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
# Masthead Plugin for Dataform
22

3-
[![npm version](https://badge.fury.io/js/%40masthead-data%2Fdataform-plugin.svg)](https://badge.fury.io/js/%40masthead-data%2Fdataform-plugin)
3+
[![npm version](https://badge.fury.io/js/%40masthead-data%2Fdataform-package.svg)](https://badge.fury.io/js/%40masthead-data%2Fdataform-package)
44

55
## Overview
66

7-
This plugin is designed to optimize BigQuery resource usage by automatically assigning compute reservations to Dataform actions based on predefined configuration. This system enables businesses to efficiently manage their BigQuery costs and resource allocation with minimal manual intervention.
7+
This package is designed to optimize BigQuery resource usage by automatically assigning compute reservations to Dataform actions based on predefined configuration. This system enables businesses to efficiently manage their BigQuery costs and resource allocation with minimal manual intervention.
88

99
## Key Benefits
1010

@@ -22,17 +22,17 @@ Add the dependency to your `package.json`:
2222
```json
2323
{
2424
"dependencies": {
25-
"@masthead-data/dataform-plugin": "0.0.2"
25+
"@masthead-data/dataform-package": "0.0.1"
2626
}
2727
}
2828
```
2929

3030
and click **Install Packages** in Dataform UI.
3131

32-
Then, import the plugin and create a setter function in your global scope under `/includes` directory:
32+
Then, import the package and create a setter function in your global scope under `/includes` directory:
3333

3434
```javascript
35-
const reservations = require("@masthead-data/dataform-plugin");
35+
const reservations = require("@masthead-data/dataform-package");
3636

3737
const RESERVATION_CONFIG = [
3838
...
@@ -153,12 +153,12 @@ Example implementation can be found in [https://github.com/HTTPArchive/dataform]
153153

154154
## Under the Hood
155155

156-
### Action Name Detection
156+
### Supported Actions
157157

158-
The plugin detects the action using two methods:
158+
The package supports various Dataform contexts for action name detection:
159159

160-
* **Primary**: `ctx.self()` function (for most Dataform contexts)
161-
* **Fallback**: `ctx.operation.proto.target` (for operation contexts)
160+
* **Standard Context**: Uses `ctx.self()` to get the action name.
161+
* **Operation Context**: Falls back to `ctx.operation.proto.target` if `ctx.self()` is not available.
162162

163163
### Reservation Lookup
164164

examples.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
/**
22
* Example usage of the Dataform Plugin
3-
* This file demonstrates various ways to use the plugin in your Dataform project
3+
* This file demonstrates various ways to use the package in your Dataform project
44
*/
55

6-
const { createReservationSetter } = require('@masthead-data/dataform-plugin')
6+
const { createReservationSetter } = require('@masthead-data/dataform-package')
77

88
// Example 1: Define your reservation configuration
99
const MY_RESERVATION_CONFIG = [
@@ -60,7 +60,7 @@ SELECT * FROM source_table
6060
// Example 4: Usage in JavaScript Dataform files
6161

6262
/*
63-
const { createReservationSetter } = require('@masthead-data/dataform-plugin')
63+
const { createReservationSetter } = require('@masthead-data/dataform-package')
6464
6565
const MY_CONFIG = [
6666
// your configuration here

index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ function preprocessConfig(config) {
8282
* @param {Array} config - Array of reservation configuration objects
8383
* @returns {Function} A reservation setter function that takes a Dataform context
8484
* @example
85-
* const { createReservationSetter } = require('@masthead-data/dataform-plugin')
85+
* const { createReservationSetter } = require('@masthead-data/dataform-package')
8686
*
8787
* const config = [
8888
* {

package.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
2-
"name": "@masthead-data/dataform-plugin",
3-
"version": "0.0.2",
4-
"description": "Masthead Data plugin for Dataform to optimize BigQuery resource usage",
2+
"name": "@masthead-data/dataform-package",
3+
"version": "0.0.1",
4+
"description": "Masthead Data package for Dataform to optimize BigQuery resource usage",
55
"main": "index.js",
66
"scripts": {
77
"test": "jest",
@@ -27,12 +27,12 @@
2727
"license": "AGPL-3.0-only",
2828
"repository": {
2929
"type": "git",
30-
"url": "git+https://github.com/masthead-data/dataform-plugin.git"
30+
"url": "git+https://github.com/masthead-data/dataform-package.git"
3131
},
3232
"bugs": {
33-
"url": "https://github.com/masthead-data/dataform-plugin/issues"
33+
"url": "https://github.com/masthead-data/dataform-package/issues"
3434
},
35-
"homepage": "https://github.com/masthead-data/dataform-plugin#readme",
35+
"homepage": "https://github.com/masthead-data/dataform-package#readme",
3636
"engines": {
3737
"node": ">=14.0.0"
3838
},

test/index.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ const {
33
getActionName
44
} = require('../index')
55

6-
// Example configuration for testing (previously hardcoded in the plugin)
6+
// Example configuration for testing (previously hardcoded in the package)
77
const EXAMPLE_RESERVATION_CONFIG = [
88
{
99
tag: 'high_slots',

0 commit comments

Comments
 (0)