Skip to content

Commit 71588a7

Browse files
committed
rename package
1 parent faf9e34 commit 71588a7

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+180
-167
lines changed

.github/workflows/deploy-pages.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
run: pnpm install
3434

3535
- name: Build oakscriptjs
36-
run: pnpm --filter @deepentropy/oakscriptjs build
36+
run: pnpm --filter oakscriptjs build
3737

3838
- name: Build example for GitHub Pages
3939
run: pnpm --filter oakscriptjs-example build:pages

.github/workflows/generate-indicators.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636
run: pnpm install
3737

3838
- name: Build transpiler
39-
run: pnpm --filter @deepentropy/pine2ts build
39+
run: pnpm --filter pine2ts build
4040

4141
- name: Generate indicators
4242
run: |
@@ -93,7 +93,7 @@ jobs:
9393
"resolveJsonModule": true,
9494
"isolatedModules": true,
9595
"paths": {
96-
"@deepentropy/oakscriptjs": ["../packages/oakscriptjs/src/index.ts"]
96+
"oakscriptjs": ["../packages/oakscriptjs/src/index.ts"]
9797
}
9898
},
9999
"include": ["./**/*.ts"],
@@ -119,7 +119,7 @@ jobs:
119119
--platform=browser \
120120
--target=es2022 \
121121
--outfile="indicators/dist/$indicator_name/$indicator_name.js" \
122-
--external:@deepentropy/oakscriptjs
122+
--external:oakscriptjs
123123
fi
124124
fi
125125
done
@@ -133,7 +133,7 @@ jobs:
133133
--platform=browser \
134134
--target=es2022 \
135135
--outfile="indicators/dist/index.js" \
136-
--external:@deepentropy/oakscriptjs
136+
--external:oakscriptjs
137137
fi
138138
139139
- name: Generate indicator manifest

.github/workflows/publish.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,13 @@ jobs:
3434
run: pnpm --filter "@deepentropy/*" test
3535

3636
- name: Publish oakscriptjs
37-
run: pnpm --filter "@deepentropy/oakscriptjs" publish --access public --no-git-checks || echo "Package may already be published"
37+
run: pnpm --filter "oakscriptjs" publish --access public --no-git-checks || echo "Package may already be published"
3838
env:
3939
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
4040
NPM_CONFIG_PROVENANCE: true
4141

4242
- name: Publish pine2ts
43-
run: pnpm --filter "@deepentropy/pine2ts" publish --access public --no-git-checks || echo "Package may already be published"
43+
run: pnpm --filter "pine2ts" publish --access public --no-git-checks || echo "Package may already be published"
4444
env:
4545
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
4646
NPM_CONFIG_PROVENANCE: true

CHANGELOG.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ This version represents a significant architectural simplification, removing the
134134

135135
**Old DSL Approach (v0.1.x):**
136136
```typescript
137-
import { indicator, plot, close, ta, compile } from '@deepentropy/oakscriptjs';
137+
import { indicator, plot, close, ta, compile } from 'oakscriptjs';
138138

139139
indicator("My Indicator");
140140
const rsi = ta.rsi(close, 14);
@@ -144,7 +144,7 @@ export default compile();
144144

145145
**New Function-Based Approach (v0.2.0):**
146146
```typescript
147-
import { Series, ta, type IndicatorResult } from '@deepentropy/oakscriptjs';
147+
import {Series, ta, type IndicatorResult} from 'oakscriptjs';
148148

149149
export function myIndicator(bars: any[]): IndicatorResult {
150150
const close = Series.fromBars(bars, 'close');

README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,23 +10,23 @@ OakScriptJS is a TypeScript/JavaScript library that provides PineScript v6 compa
1010

1111
## Packages
1212

13-
| Package | Description |
14-
|---------|-------------|
15-
| [@deepentropy/oakscriptjs](./packages/oakscriptjs) | Technical analysis library with Series-based API |
16-
| [@deepentropy/pine2ts](./packages/pine2ts) | PineScript to TypeScript transpiler |
13+
| Package | Description |
14+
|---------------------------------------|--------------------------------------------------|
15+
| [oakscriptjs](./packages/oakscriptjs) | Technical analysis library with Series-based API |
16+
| [pine2ts](./packages/pine2ts) | PineScript to TypeScript transpiler |
1717

1818
## Quick Start
1919

2020
### Install the library
2121

2222
```bash
23-
npm install @deepentropy/oakscriptjs
23+
npm install oakscriptjs
2424
```
2525

2626
### Calculate an indicator
2727

2828
```typescript
29-
import { Series, ta } from '@deepentropy/oakscriptjs';
29+
import {Series, ta} from 'oakscriptjs';
3030

3131
const prices = [44, 44.5, 45, 45.5, 46, 46.5, 47, 47.5, 48, 48.5];
3232
const close = new Series(prices);
@@ -38,7 +38,7 @@ console.log(sma.toArray());
3838
### Transpile PineScript to TypeScript
3939

4040
```bash
41-
npm install -g @deepentropy/pine2ts
41+
npm install -g pine2ts
4242

4343
pine2ts my-indicator.pine output.ts
4444
```
@@ -70,8 +70,8 @@ pnpm typecheck # Type check
7070
### Working with packages
7171

7272
```bash
73-
pnpm --filter @deepentropy/oakscriptjs build
74-
pnpm --filter @deepentropy/pine2ts test
73+
pnpm --filter oakscriptjs build
74+
pnpm --filter pine2ts test
7575
```
7676

7777
## Project Structure

docs/guide.md

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ OakScriptJS is a simplified JavaScript/TypeScript library that provides the comp
2323
Pure calculation functions matching PineScript signatures.
2424

2525
```typescript
26-
import { taCore } from '@deepentropy/oakscriptjs';
26+
import {taCore} from 'oakscriptjs';
2727

2828
const prices = [10, 12, 11, 13, 15];
2929
const sma = taCore.sma(prices, 3);
@@ -33,7 +33,7 @@ const sma = taCore.sma(prices, 3);
3333
Lazy evaluation with operator chaining.
3434

3535
```typescript
36-
import { Series } from '@deepentropy/oakscriptjs';
36+
import { Series } from 'oakscriptjs';
3737

3838
const data = [/* bar data */];
3939
const close = new Series(data, (bar) => bar.close);
@@ -47,7 +47,7 @@ const change = close.sub(open);
4747
Series-based wrappers for technical analysis.
4848

4949
```typescript
50-
import { ta, Series } from '@deepentropy/oakscriptjs';
50+
import {ta, Series} from 'oakscriptjs';
5151

5252
const close = new Series(data, (bar) => bar.close);
5353
const rsi = ta.rsi(close, 14); // Returns a Series
@@ -77,19 +77,19 @@ const rsi = ta.rsi(close, 14); // Returns a Series
7777

7878
```bash
7979
# npm
80-
npm install @deepentropy/oakscriptjs
80+
npm install oakscriptjs
8181

8282
# pnpm
83-
pnpm add @deepentropy/oakscriptjs
83+
pnpm add oakscriptjs
8484

8585
# JSR
86-
npx jsr add @deepentropy/oakscriptjs
86+
npx jsr add oakscriptjs
8787
```
8888

8989
### Quick Start: Basic Calculations
9090

9191
```typescript
92-
import { taCore, math } from '@deepentropy/oakscriptjs';
92+
import {taCore, math} from 'oakscriptjs';
9393

9494
// Price data
9595
const closes = [100, 102, 101, 103, 105, 104, 106];
@@ -109,7 +109,7 @@ const max = math.max(...closes);
109109
The Series class enables lazy evaluation and operator chaining:
110110

111111
```typescript
112-
import { Series, ta } from '@deepentropy/oakscriptjs';
112+
import {Series, ta} from 'oakscriptjs';
113113

114114
const bars = [
115115
{ time: '2024-01-01', open: 100, high: 105, low: 99, close: 103 },
@@ -136,7 +136,7 @@ const lastRSI = rsi.last();
136136
The `BarData` class wraps bar arrays and tracks version changes for automatic cache invalidation:
137137

138138
```typescript
139-
import { BarData, Series, ta } from '@deepentropy/oakscriptjs';
139+
import {BarData, Series, ta} from 'oakscriptjs';
140140

141141
// Create BarData wrapper
142142
const barData = new BarData(bars);
@@ -164,7 +164,7 @@ const values2 = sma.toArray(); // Fresh computation with new data
164164
Complex Series expressions create closure chains that keep intermediate Series in memory. Use `materialize()` to break these chains:
165165

166166
```typescript
167-
import { Series } from '@deepentropy/oakscriptjs';
167+
import {Series} from 'oakscriptjs';
168168

169169
const close = Series.fromBars(bars, 'close');
170170
const open = Series.fromBars(bars, 'open');
@@ -191,7 +191,7 @@ const result = materialized.div(low).add(volume);
191191
#### Technical Analysis (`ta` and `taCore`)
192192

193193
```typescript
194-
import { ta, taCore } from '@deepentropy/oakscriptjs';
194+
import {ta, taCore} from 'oakscriptjs';
195195

196196
// Core (array-based)
197197
taCore.sma(priceArray, length)
@@ -219,7 +219,7 @@ ta.crossover(), ta.crossunder(), ta.cross()
219219
#### Mathematics (`math`)
220220

221221
```typescript
222-
import { math } from '@deepentropy/oakscriptjs';
222+
import {math} from 'oakscriptjs';
223223

224224
math.abs(x)
225225
math.max(...values)
@@ -234,7 +234,7 @@ math.sin(x), math.cos(x), math.tan(x)
234234
#### Arrays (`array`)
235235

236236
```typescript
237-
import { array } from '@deepentropy/oakscriptjs';
237+
import {array} from 'oakscriptjs';
238238

239239
const arr = array.new_float(10, 0);
240240
array.push(arr, 5);
@@ -286,7 +286,7 @@ plot(bop, color=color.red)
286286

287287
**Transpiled Output (Recommended):**
288288
```typescript
289-
import { Series, type IndicatorResult } from '@deepentropy/oakscriptjs';
289+
import {Series, type IndicatorResult} from 'oakscriptjs';
290290

291291
export function balanceOfPower(bars: any[]): IndicatorResult {
292292
// Create Series
@@ -372,7 +372,7 @@ Series arithmetic uses method calls:
372372
Every indicator function should return an `IndicatorResult`:
373373

374374
```typescript
375-
import type { IndicatorResult } from '@deepentropy/oakscriptjs';
375+
import type {IndicatorResult} from 'oakscriptjs';
376376

377377
export function myIndicator(bars: any[], options?: any): IndicatorResult {
378378
// ... calculations ...
@@ -418,7 +418,7 @@ hline(50, "Middle", color.gray)
418418

419419
**Transpiled:**
420420
```typescript
421-
import { Series, ta, type IndicatorResult } from '@deepentropy/oakscriptjs';
421+
import {Series, ta, type IndicatorResult} from 'oakscriptjs';
422422

423423
export function rsiIndicator(
424424
bars: any[],
@@ -502,7 +502,7 @@ Features not in OakScriptJS (handle in transpiler):
502502
#### taCore (Technical Analysis - Array-based)
503503

504504
```typescript
505-
import { taCore } from '@deepentropy/oakscriptjs';
505+
import {taCore} from 'oakscriptjs';
506506

507507
// Moving Averages
508508
taCore.sma(source: number[], length: number): number[]
@@ -532,7 +532,7 @@ taCore.bb(
532532
#### ta (Technical Analysis - Series-based)
533533

534534
```typescript
535-
import { ta } from '@deepentropy/oakscriptjs';
535+
import {ta} from 'oakscriptjs';
536536

537537
// All functions accept Series and return Series
538538
ta.sma(source: Series, length: number): Series
@@ -625,7 +625,7 @@ import type {
625625
HLineOptions,
626626
FillData,
627627
InputMetadata
628-
} from '@deepentropy/oakscriptjs';
628+
} from 'oakscriptjs';
629629

630630
interface IndicatorResult {
631631
metadata: IndicatorMetadata;
@@ -642,7 +642,7 @@ interface IndicatorResult {
642642
### Example 1: Simple Moving Average
643643

644644
```typescript
645-
import { Series, ta, type IndicatorResult } from '@deepentropy/oakscriptjs';
645+
import {Series, ta, type IndicatorResult} from 'oakscriptjs';
646646

647647
export function smaIndicator(
648648
bars: any[],
@@ -671,7 +671,7 @@ export function smaIndicator(
671671
### Example 2: Balance of Power (Native Operators)
672672

673673
```typescript
674-
import { Series, type IndicatorResult } from '@deepentropy/oakscriptjs';
674+
import {Series, type IndicatorResult} from 'oakscriptjs';
675675

676676
export function bopIndicator(bars: any[]): IndicatorResult {
677677
const close = new Series(bars, (bar) => bar.close);
@@ -704,11 +704,11 @@ export function bopIndicator(bars: any[]): IndicatorResult {
704704

705705
### Build Issues
706706

707-
**Problem**: `Cannot find module '@deepentropy/oakscriptjs'`
707+
**Problem**: `Cannot find module 'oakscriptjs'`
708708

709709
**Solution**:
710710
```bash
711-
npm install @deepentropy/oakscriptjs
711+
npm install oakscriptjs
712712
```
713713

714714
**Problem**: Operators not working (`close - open` gives error)
@@ -729,7 +729,7 @@ npm install @deepentropy/oakscriptjs
729729

730730
**Solution**: Import Series type:
731731
```typescript
732-
import { Series } from '@deepentropy/oakscriptjs';
732+
import { Series } from 'oakscriptjs';
733733
```
734734

735735
---

example/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ plot(out, color=color.blue, title="MA", offset=offset)
144144

145145
## Dependencies
146146

147-
- **@deepentropy/oakscriptjs**: Technical analysis library
147+
- **oakscriptjs**: Technical analysis library
148148
- **@deepentropy/indicators**: Reusable indicators from the repository root
149149
- **lightweight-charts**: TradingView's charting library (v5)
150150
- **vite**: Build tool and dev server

example/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"preview": "vite preview"
1111
},
1212
"dependencies": {
13-
"@deepentropy/oakscriptjs": "workspace:*",
13+
"oakscriptjs": "workspace:*",
1414
"lightweight-charts": "^5.0.0"
1515
},
1616
"devDependencies": {

example/src/chart.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import {
1515
ColorType,
1616
LineStyle,
1717
} from 'lightweight-charts';
18-
import type { Bar } from '@deepentropy/oakscriptjs';
18+
import type {Bar} from 'oakscriptjs';
1919
import { toCandlestickData } from './data-loader';
2020

2121
/**

example/src/data-loader.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Loads and parses CSV data files for chart display
44
*/
55

6-
import type { Bar } from '@deepentropy/oakscriptjs';
6+
import type {Bar} from 'oakscriptjs';
77

88
/**
99
* Candlestick data format for LightweightCharts

0 commit comments

Comments
 (0)