Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Distinguish between URL paths and file paths at the type level #881

Closed
wants to merge 32 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
7221d92
typescript level conversion
mythmon Feb 21, 2024
8ad8455
remove only
mythmon Feb 21, 2024
9025a89
fix create tests
mythmon Feb 21, 2024
58705a3
optionally split build tests by platform
mythmon Feb 21, 2024
ffd4cd2
Merge remote-tracking branch 'origin/main' into mythmon/240216/brande…
mythmon Feb 21, 2024
f4699e5
tests passing locally
mythmon Feb 22, 2024
dcb4866
windows ci?
mythmon Feb 22, 2024
b3065f2
unskip build tests
mythmon Feb 22, 2024
254355d
add some ci debugging options
mythmon Feb 22, 2024
12118dc
more ci debugging
mythmon Feb 22, 2024
034bb47
normalize line endings in build tests
mythmon Feb 22, 2024
a3c73cf
change "simple" test data loader to js for windows compat
mythmon Feb 22, 2024
6b7c8c3
test matrix exclude
mythmon Feb 22, 2024
1b5aea5
add matrix parameters to artifact output
mythmon Feb 22, 2024
ca96b12
matrix exclude goes in matrix key
mythmon Feb 22, 2024
845e50a
fix paths in dynamic archive tests
mythmon Feb 22, 2024
12f91f9
add .gitattributes to enforce consistent line endings for test inputs
mythmon Feb 22, 2024
bcd8185
fix loader path better
mythmon Feb 22, 2024
aa162a0
always use posix-line endings
mythmon Feb 22, 2024
420c1f4
normalize all the line endings
mythmon Feb 22, 2024
1b6fdbc
debugging line endings
mythmon Feb 22, 2024
b7064b0
tsc
mythmon Feb 22, 2024
196c962
Revert "debugging line endings"
mythmon Feb 22, 2024
06801cb
ci test: change binary name?
mythmon Feb 22, 2024
2ecad19
better handle paths in create
mythmon Feb 22, 2024
dd7dc15
cleanup
mythmon Feb 22, 2024
a6a0a4a
fix expected output
mythmon Feb 22, 2024
9ddefa4
Remove excessive slashes in file:////
mythmon Feb 22, 2024
518f5bf
don't abbreviate UrlPath
mythmon Feb 22, 2024
6786e32
Merge branch 'main' into mythmon/240216/branded-paths
mythmon Feb 23, 2024
464ca6c
Fix path logic in preview's hello
mythmon Feb 23, 2024
80f4b90
lint
mythmon Feb 23, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions .gitattributes
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should disable autocrlf.

* text=false

Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Ask git to automatically ensure that text files have posix-style line endings.
* text eol=lf

# Git can usually detect binary files, but lets mark the binary files we have
# in the repository as binary just to be safe.
*.arrow binary
*.db binary
*.jpg binary
*.mp4 binary
*.parquet binary
*.png binary
*.tar binary
*.tgz binary
*.webp binary
*.xlsx binary
*.zip binary
5 changes: 3 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ jobs:
strategy:
matrix:
version: [20, 21]
runs-on: ubuntu-latest
os: [ubuntu-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
Expand All @@ -28,7 +29,7 @@ jobs:
- uses: actions/upload-artifact@v3
if: failure()
with:
name: test-output-changes
name: test-output-changes-${{ matrix.os }}-${{ matrix.version }}
path: |
test/output/*-changed.*
test/output/build/*-changed/
12 changes: 9 additions & 3 deletions bin/observable-init.js
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I want to remove our runtime dependency on tsx. #850 Also, we’ll need the same fix in the @observablehq/create repo.

Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
#!/usr/bin/env -S node --no-warnings=ExperimentalWarning
#!/usr/bin/env node
import {fileURLToPath} from "node:url";
import crossSpawn from "cross-spawn";

await import("tsx/esm");
await import("./observable.ts");
const observablePath = fileURLToPath(import.meta.resolve("./observable.ts"));
crossSpawn.sync(
"node",
["--no-warnings=ExperimentalWarning", "--import", "tsx/esm", observablePath, ...process.argv.slice(2)],
{stdio: "inherit"}
);
156 changes: 78 additions & 78 deletions examples/eia/docs/data/eia-bia-reference.csv
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let’s leave these as-is to minimize this PR.

Original file line number Diff line number Diff line change
@@ -1,79 +1,79 @@
BA Code,BA Name,Time Zone,Region/Country Code,Region/Country Name,Generation Only BA,Demand by BA Subregion,U.S. BA,Active BA,Activation Date,Retirement Date
AEC,PowerSouth Energy Cooperative,Central,SE,Southeast,No,No,Yes,No,,9/1/2021
AECI,"Associated Electric Cooperative, Inc.",Central,MIDW,Midwest,No,No,Yes,Yes,,
AVA,Avista Corporation,Pacific,NW,Northwest,No,No,Yes,Yes,,
AVRN,"Avangrid Renewables, LLC",Pacific,NW,Northwest,Yes,No,Yes,Yes,7/31/2018,
AZPS,Arizona Public Service Company,Arizona,SW,Southwest,No,No,Yes,Yes,,
BANC,Balancing Authority of Northern California,Pacific,CAL,California,No,No,Yes,Yes,,
BPAT,Bonneville Power Administration,Pacific,NW,Northwest,No,No,Yes,Yes,,
CHPD,Public Utility District No. 1 of Chelan County,Pacific,NW,Northwest,No,No,Yes,Yes,,
CISO,California Independent System Operator,Pacific,CAL,California,No,Yes,Yes,Yes,,
CPLE,Duke Energy Progress East,Eastern,CAR,Carolinas,No,No,Yes,Yes,,
CPLW,Duke Energy Progress West,Eastern,CAR,Carolinas,No,No,Yes,Yes,,
DEAA,"Arlington Valley, LLC",Arizona,SW,Southwest,Yes,No,Yes,Yes,,
DOPD,PUD No. 1 of Douglas County,Pacific,NW,Northwest,No,No,Yes,Yes,,
DUK,Duke Energy Carolinas,Eastern,CAR,Carolinas,No,No,Yes,Yes,,
EEI,"Electric Energy, Inc.",Central,MIDW,Midwest,Yes,No,Yes,No,,2/29/2020
EPE,El Paso Electric Company,Arizona,SW,Southwest,No,No,Yes,Yes,,
ERCO,"Electric Reliability Council of Texas, Inc.",Central,TEX,Texas,No,Yes,Yes,Yes,,
FMPP,Florida Municipal Power Pool,Eastern,FLA,Florida,No,No,Yes,Yes,,
FPC,"Duke Energy Florida, Inc.",Eastern,FLA,Florida,No,No,Yes,Yes,,
FPL,Florida Power & Light Co.,Eastern,FLA,Florida,No,No,Yes,Yes,,
GCPD,"Public Utility District No. 2 of Grant County, Washington",Pacific,NW,Northwest,No,No,Yes,Yes,,
GLHB,GridLiance,Central,MIDW,Midwest,Yes,No,Yes,No,2/29/2020,9/1/2022
GRID,"Gridforce Energy Management, LLC",Pacific,NW,Northwest,Yes,No,Yes,Yes,,
GRIF,"Griffith Energy, LLC",Arizona,SW,Southwest,Yes,No,Yes,Yes,,
GRMA,"Gila River Power, LLC",Arizona,SW,Southwest,Yes,No,Yes,No,,5/3/2018
GVL,Gainesville Regional Utilities,Eastern,FLA,Florida,No,No,Yes,Yes,,
GWA,"NaturEner Power Watch, LLC",Mountain,NW,Northwest,Yes,No,Yes,Yes,,
HGMA,"New Harquahala Generating Company, LLC",Arizona,SW,Southwest,Yes,No,Yes,Yes,,
HST,City of Homestead,Eastern,FLA,Florida,No,No,Yes,Yes,,
IID,Imperial Irrigation District,Pacific,CAL,California,No,No,Yes,Yes,,
IPCO,Idaho Power Company,Pacific,NW,Northwest,No,No,Yes,Yes,,
ISNE,ISO New England,Eastern,NE,New England,No,Yes,Yes,Yes,,
JEA,JEA,Eastern,FLA,Florida,No,No,Yes,Yes,,
LDWP,Los Angeles Department of Water and Power,Pacific,CAL,California,No,No,Yes,Yes,,
LGEE,Louisville Gas and Electric Company and Kentucky Utilities Company,Eastern,MIDW,Midwest,No,No,Yes,Yes,,
MISO,"Midcontinent Independent System Operator, Inc.",Eastern,MIDW,Midwest,No,Yes,Yes,Yes,,
NEVP,Nevada Power Company,Pacific,NW,Northwest,No,No,Yes,Yes,,
NSB,Utilities Commission of New Smyrna Beach,Eastern,FLA,Florida,No,No,Yes,No,,1/8/2020
NWMT,NorthWestern Corporation,Mountain,NW,Northwest,No,No,Yes,Yes,,
NYIS,New York Independent System Operator,Eastern,NY,New York,No,Yes,Yes,Yes,,
OVEC,Ohio Valley Electric Corporation,Eastern,MIDA,Mid-Atlantic,No,No,Yes,No,,12/1/2018
PACE,PacifiCorp East,Mountain,NW,Northwest,No,No,Yes,Yes,,
PACW,PacifiCorp West,Pacific,NW,Northwest,No,No,Yes,Yes,,
PGE,Portland General Electric Company,Pacific,NW,Northwest,No,No,Yes,Yes,,
PJM,"PJM Interconnection, LLC",Eastern,MIDA,Mid-Atlantic,No,Yes,Yes,Yes,,
PNM,Public Service Company of New Mexico,Arizona,SW,Southwest,No,Yes,Yes,Yes,,
PSCO,Public Service Company of Colorado,Mountain,NW,Northwest,No,No,Yes,Yes,,
PSEI,"Puget Sound Energy, Inc.",Pacific,NW,Northwest,No,No,Yes,Yes,,
SC,South Carolina Public Service Authority,Eastern,CAR,Carolinas,No,No,Yes,Yes,,
SCEG,"Dominion Energy South Carolina, Inc.",Eastern,CAR,Carolinas,No,No,Yes,Yes,,
SCL,Seattle City Light,Pacific,NW,Northwest,No,No,Yes,Yes,,
SEC,Seminole Electric Cooperative,Eastern,FLA,Florida,No,No,Yes,Yes,,
SEPA,Southeastern Power Administration,Central,SE,Southeast,Yes,No,Yes,Yes,,
SOCO,"Southern Company Services, Inc. - Trans",Central,SE,Southeast,No,No,Yes,Yes,,
SPA,Southwestern Power Administration,Central,CENT,Central,No,No,Yes,Yes,,
SRP,Salt River Project Agricultural Improvement and Power District,Arizona,SW,Southwest,No,No,Yes,Yes,,
SWPP,Southwest Power Pool,Central,CENT,Central,No,Yes,Yes,Yes,,
TAL,City of Tallahassee,Eastern,FLA,Florida,No,No,Yes,Yes,,
TEC,Tampa Electric Company,Eastern,FLA,Florida,No,No,Yes,Yes,,
TEPC,Tucson Electric Power,Arizona,SW,Southwest,No,No,Yes,Yes,,
TIDC,Turlock Irrigation District,Pacific,CAL,California,No,No,Yes,Yes,,
TPWR,"City of Tacoma, Department of Public Utilities, Light Division",Pacific,NW,Northwest,No,No,Yes,Yes,,
TVA,Tennessee Valley Authority,Central,TEN,Tennessee,No,No,Yes,Yes,,
WACM,Western Area Power Administration - Rocky Mountain Region,Arizona,NW,Northwest,No,No,Yes,Yes,,
WALC,Western Area Power Administration - Desert Southwest Region,Arizona,SW,Southwest,No,No,Yes,Yes,,
WAUE,Western Area Power Administration - Upper Great Plains East,Mountain,NW,Northwest,No,No,Yes,No,,10/1/2015
WAUW,Western Area Power Administration - Upper Great Plains West,Mountain,NW,Northwest,No,No,Yes,Yes,,
WWA,"NaturEner Wind Watch, LLC",Mountain,NW,Northwest,Yes,No,Yes,Yes,,
YAD,"Alcoa Power Generating, Inc. - Yadkin Division",Eastern,CAR,Carolinas,Yes,No,Yes,Yes,,
AESO,Alberta Electric System Operator,,CAN,Canada,No,No,No,Yes,,
BCHA,British Columbia Hydro and Power Authority,,CAN,Canada,No,No,No,Yes,,
HQT,Hydro-Quebec TransEnergie,,CAN,Canada,No,No,No,Yes,,
IESO,Ontario IESO,,CAN,Canada,No,No,No,Yes,,
MHEB,Manitoba Hydro,,CAN,Canada,No,No,No,Yes,,
NBSO,New Brunswick System Operator,,CAN,Canada,No,No,No,Yes,,
SPC,Saskatchewan Power Corporation,,CAN,Canada,No,No,No,Yes,,
CEN,Centro Nacional de Control de Energia,,MEX,Mexico,No,No,No,Yes,10/31/2017,
BA Code,BA Name,Time Zone,Region/Country Code,Region/Country Name,Generation Only BA,Demand by BA Subregion,U.S. BA,Active BA,Activation Date,Retirement Date
AEC,PowerSouth Energy Cooperative,Central,SE,Southeast,No,No,Yes,No,,9/1/2021
AECI,"Associated Electric Cooperative, Inc.",Central,MIDW,Midwest,No,No,Yes,Yes,,
AVA,Avista Corporation,Pacific,NW,Northwest,No,No,Yes,Yes,,
AVRN,"Avangrid Renewables, LLC",Pacific,NW,Northwest,Yes,No,Yes,Yes,7/31/2018,
AZPS,Arizona Public Service Company,Arizona,SW,Southwest,No,No,Yes,Yes,,
BANC,Balancing Authority of Northern California,Pacific,CAL,California,No,No,Yes,Yes,,
BPAT,Bonneville Power Administration,Pacific,NW,Northwest,No,No,Yes,Yes,,
CHPD,Public Utility District No. 1 of Chelan County,Pacific,NW,Northwest,No,No,Yes,Yes,,
CISO,California Independent System Operator,Pacific,CAL,California,No,Yes,Yes,Yes,,
CPLE,Duke Energy Progress East,Eastern,CAR,Carolinas,No,No,Yes,Yes,,
CPLW,Duke Energy Progress West,Eastern,CAR,Carolinas,No,No,Yes,Yes,,
DEAA,"Arlington Valley, LLC",Arizona,SW,Southwest,Yes,No,Yes,Yes,,
DOPD,PUD No. 1 of Douglas County,Pacific,NW,Northwest,No,No,Yes,Yes,,
DUK,Duke Energy Carolinas,Eastern,CAR,Carolinas,No,No,Yes,Yes,,
EEI,"Electric Energy, Inc.",Central,MIDW,Midwest,Yes,No,Yes,No,,2/29/2020
EPE,El Paso Electric Company,Arizona,SW,Southwest,No,No,Yes,Yes,,
ERCO,"Electric Reliability Council of Texas, Inc.",Central,TEX,Texas,No,Yes,Yes,Yes,,
FMPP,Florida Municipal Power Pool,Eastern,FLA,Florida,No,No,Yes,Yes,,
FPC,"Duke Energy Florida, Inc.",Eastern,FLA,Florida,No,No,Yes,Yes,,
FPL,Florida Power & Light Co.,Eastern,FLA,Florida,No,No,Yes,Yes,,
GCPD,"Public Utility District No. 2 of Grant County, Washington",Pacific,NW,Northwest,No,No,Yes,Yes,,
GLHB,GridLiance,Central,MIDW,Midwest,Yes,No,Yes,No,2/29/2020,9/1/2022
GRID,"Gridforce Energy Management, LLC",Pacific,NW,Northwest,Yes,No,Yes,Yes,,
GRIF,"Griffith Energy, LLC",Arizona,SW,Southwest,Yes,No,Yes,Yes,,
GRMA,"Gila River Power, LLC",Arizona,SW,Southwest,Yes,No,Yes,No,,5/3/2018
GVL,Gainesville Regional Utilities,Eastern,FLA,Florida,No,No,Yes,Yes,,
GWA,"NaturEner Power Watch, LLC",Mountain,NW,Northwest,Yes,No,Yes,Yes,,
HGMA,"New Harquahala Generating Company, LLC",Arizona,SW,Southwest,Yes,No,Yes,Yes,,
HST,City of Homestead,Eastern,FLA,Florida,No,No,Yes,Yes,,
IID,Imperial Irrigation District,Pacific,CAL,California,No,No,Yes,Yes,,
IPCO,Idaho Power Company,Pacific,NW,Northwest,No,No,Yes,Yes,,
ISNE,ISO New England,Eastern,NE,New England,No,Yes,Yes,Yes,,
JEA,JEA,Eastern,FLA,Florida,No,No,Yes,Yes,,
LDWP,Los Angeles Department of Water and Power,Pacific,CAL,California,No,No,Yes,Yes,,
LGEE,Louisville Gas and Electric Company and Kentucky Utilities Company,Eastern,MIDW,Midwest,No,No,Yes,Yes,,
MISO,"Midcontinent Independent System Operator, Inc.",Eastern,MIDW,Midwest,No,Yes,Yes,Yes,,
NEVP,Nevada Power Company,Pacific,NW,Northwest,No,No,Yes,Yes,,
NSB,Utilities Commission of New Smyrna Beach,Eastern,FLA,Florida,No,No,Yes,No,,1/8/2020
NWMT,NorthWestern Corporation,Mountain,NW,Northwest,No,No,Yes,Yes,,
NYIS,New York Independent System Operator,Eastern,NY,New York,No,Yes,Yes,Yes,,
OVEC,Ohio Valley Electric Corporation,Eastern,MIDA,Mid-Atlantic,No,No,Yes,No,,12/1/2018
PACE,PacifiCorp East,Mountain,NW,Northwest,No,No,Yes,Yes,,
PACW,PacifiCorp West,Pacific,NW,Northwest,No,No,Yes,Yes,,
PGE,Portland General Electric Company,Pacific,NW,Northwest,No,No,Yes,Yes,,
PJM,"PJM Interconnection, LLC",Eastern,MIDA,Mid-Atlantic,No,Yes,Yes,Yes,,
PNM,Public Service Company of New Mexico,Arizona,SW,Southwest,No,Yes,Yes,Yes,,
PSCO,Public Service Company of Colorado,Mountain,NW,Northwest,No,No,Yes,Yes,,
PSEI,"Puget Sound Energy, Inc.",Pacific,NW,Northwest,No,No,Yes,Yes,,
SC,South Carolina Public Service Authority,Eastern,CAR,Carolinas,No,No,Yes,Yes,,
SCEG,"Dominion Energy South Carolina, Inc.",Eastern,CAR,Carolinas,No,No,Yes,Yes,,
SCL,Seattle City Light,Pacific,NW,Northwest,No,No,Yes,Yes,,
SEC,Seminole Electric Cooperative,Eastern,FLA,Florida,No,No,Yes,Yes,,
SEPA,Southeastern Power Administration,Central,SE,Southeast,Yes,No,Yes,Yes,,
SOCO,"Southern Company Services, Inc. - Trans",Central,SE,Southeast,No,No,Yes,Yes,,
SPA,Southwestern Power Administration,Central,CENT,Central,No,No,Yes,Yes,,
SRP,Salt River Project Agricultural Improvement and Power District,Arizona,SW,Southwest,No,No,Yes,Yes,,
SWPP,Southwest Power Pool,Central,CENT,Central,No,Yes,Yes,Yes,,
TAL,City of Tallahassee,Eastern,FLA,Florida,No,No,Yes,Yes,,
TEC,Tampa Electric Company,Eastern,FLA,Florida,No,No,Yes,Yes,,
TEPC,Tucson Electric Power,Arizona,SW,Southwest,No,No,Yes,Yes,,
TIDC,Turlock Irrigation District,Pacific,CAL,California,No,No,Yes,Yes,,
TPWR,"City of Tacoma, Department of Public Utilities, Light Division",Pacific,NW,Northwest,No,No,Yes,Yes,,
TVA,Tennessee Valley Authority,Central,TEN,Tennessee,No,No,Yes,Yes,,
WACM,Western Area Power Administration - Rocky Mountain Region,Arizona,NW,Northwest,No,No,Yes,Yes,,
WALC,Western Area Power Administration - Desert Southwest Region,Arizona,SW,Southwest,No,No,Yes,Yes,,
WAUE,Western Area Power Administration - Upper Great Plains East,Mountain,NW,Northwest,No,No,Yes,No,,10/1/2015
WAUW,Western Area Power Administration - Upper Great Plains West,Mountain,NW,Northwest,No,No,Yes,Yes,,
WWA,"NaturEner Wind Watch, LLC",Mountain,NW,Northwest,Yes,No,Yes,Yes,,
YAD,"Alcoa Power Generating, Inc. - Yadkin Division",Eastern,CAR,Carolinas,Yes,No,Yes,Yes,,
AESO,Alberta Electric System Operator,,CAN,Canada,No,No,No,Yes,,
BCHA,British Columbia Hydro and Power Authority,,CAN,Canada,No,No,No,Yes,,
HQT,Hydro-Quebec TransEnergie,,CAN,Canada,No,No,No,Yes,,
IESO,Ontario IESO,,CAN,Canada,No,No,No,Yes,,
MHEB,Manitoba Hydro,,CAN,Canada,No,No,No,Yes,,
NBSO,New Brunswick System Operator,,CAN,Canada,No,No,No,Yes,,
SPC,Saskatchewan Power Corporation,,CAN,Canada,No,No,No,Yes,,
CEN,Centro Nacional de Control de Energia,,MEX,Mexico,No,No,No,Yes,10/31/2017,
CFE,Comision Federal de Electricidad,,MEX,Mexico,No,No,No,No,,7/1/2018
Loading