Skip to content

Conversation

@aron
Copy link
Contributor

@aron aron commented Jan 15, 2024

Currently we include all files including tests, ci scripts and tooling config. This limits the package to only include what's needed.

See: https://npmfs.com/package/replicate/0.25.2/

Before
~/Code/replicate-javascript (main) % npm pack                         
replicate-0.25.2.tgz
~/Code/replicate-javascript (main) % tar -tvf replicate-0.25.2.tgz    
-rw-r--r--  0 0      0         301 26 Oct  1985 package/.editorconfig
-rw-r--r--  0 0      0          70 26 Oct  1985 package/.git-blame-ignore-revs
-rw-r--r--  0 0      0       10935 26 Oct  1985 package/LICENSE
-rw-r--r--  0 0      0         720 26 Oct  1985 package/lib/collections.js
-rw-r--r--  0 0      0        1386 26 Oct  1985 package/lib/deployments.js
-rw-r--r--  0 0      0         513 26 Oct  1985 package/lib/error.js
-rw-r--r--  0 0      0         280 26 Oct  1985 package/lib/hardware.js
-rw-r--r--  0 0      0        1003 26 Oct  1985 package/lib/identifier.js
-rw-r--r--  0 0      0       12117 26 Oct  1985 package/index.js
-rw-r--r--  0 0      0         361 26 Oct  1985 package/integration/commonjs/index.js
-rw-r--r--  0 0      0         349 26 Oct  1985 package/integration/esm/index.js
-rw-r--r--  0 0      0         223 26 Oct  1985 package/integration/commonjs/index.test.js
-rw-r--r--  0 0      0         206 26 Oct  1985 package/integration/esm/index.test.js
-rw-r--r--  0 0      0         329 26 Oct  1985 package/jest.config.js
-rw-r--r--  0 0      0        3533 26 Oct  1985 package/lib/models.js
-rw-r--r--  0 0      0        2464 26 Oct  1985 package/lib/predictions.js
-rw-r--r--  0 0      0        2813 26 Oct  1985 package/lib/stream.js
-rw-r--r--  0 0      0        2368 26 Oct  1985 package/lib/trainings.js
-rw-r--r--  0 0      0        2609 26 Oct  1985 package/lib/util.js
-rw-r--r--  0 0      0         815 26 Oct  1985 package/test/node_modules/.package-lock.json
-rw-r--r--  0 0      0         660 26 Oct  1985 package/biome.json
-rw-r--r--  0 0      0          43 26 Oct  1985 package/.vscode/extensions.json
-rw-r--r--  0 0      0         289 26 Oct  1985 package/jsconfig.json
-rw-r--r--  0 0      0         962 26 Oct  1985 package/integration/commonjs/package-lock.json
-rw-r--r--  0 0      0         979 26 Oct  1985 package/integration/esm/package-lock.json
-rw-r--r--  0 0      0        2055 26 Oct  1985 package/integration/typescript/package-lock.json
-rw-r--r--  0 0      0         266 26 Oct  1985 package/integration/commonjs/package.json
-rw-r--r--  0 0      0         297 26 Oct  1985 package/integration/esm/package.json
-rw-r--r--  0 0      0         361 26 Oct  1985 package/integration/typescript/package.json
-rw-r--r--  0 0      0         925 26 Oct  1985 package/package.json
-rw-r--r--  0 0      0         216 26 Oct  1985 package/.vscode/settings.json
-rw-r--r--  0 0      0       12288 26 Oct  1985 package/integration/typescript/tsconfig.json
-rw-r--r--  0 0      0         141 26 Oct  1985 package/tsconfig.json
-rw-r--r--  0 0      0         638 26 Oct  1985 package/CONTRIBUTING.md
-rw-r--r--  0 0      0       34093 26 Oct  1985 package/README.md
-rw-r--r--  0 0      0        5438 26 Oct  1985 package/index.d.ts
-rw-r--r--  0 0      0       30759 26 Oct  1985 package/index.test.ts
-rw-r--r--  0 0      0         437 26 Oct  1985 package/integration/typescript/index.test.ts
-rw-r--r--  0 0      0         355 26 Oct  1985 package/integration/typescript/index.ts
-rw-r--r--  0 0      0        1304 26 Oct  1985 package/.github/workflows/ci.yml
After
~/Code/replicate-javascript (package-files) % npm pack    
replicate-0.25.2.tgz
~/Code/replicate-javascript (package-files) % tar -ztvf replicate-0.25.2.tgz
-rw-r--r--  0 0      0       10935 26 Oct  1985 package/LICENSE
-rw-r--r--  0 0      0         720 26 Oct  1985 package/lib/collections.js
-rw-r--r--  0 0      0        1386 26 Oct  1985 package/lib/deployments.js
-rw-r--r--  0 0      0         513 26 Oct  1985 package/lib/error.js
-rw-r--r--  0 0      0         280 26 Oct  1985 package/lib/hardware.js
-rw-r--r--  0 0      0        1003 26 Oct  1985 package/lib/identifier.js
-rw-r--r--  0 0      0       12117 26 Oct  1985 package/index.js
-rw-r--r--  0 0      0        3533 26 Oct  1985 package/lib/models.js
-rw-r--r--  0 0      0        2464 26 Oct  1985 package/lib/predictions.js
-rw-r--r--  0 0      0        2813 26 Oct  1985 package/lib/stream.js
-rw-r--r--  0 0      0        2368 26 Oct  1985 package/lib/trainings.js
-rw-r--r--  0 0      0        2609 26 Oct  1985 package/lib/util.js
-rw-r--r--  0 0      0        1095 26 Oct  1985 package/package.json
-rw-r--r--  0 0      0         638 26 Oct  1985 package/CONTRIBUTING.md
-rw-r--r--  0 0      0       34093 26 Oct  1985 package/README.md
-rw-r--r--  0 0      0        5438 26 Oct  1985 package/index.d.ts
~/Code/replicate-javascript (package-files) % 

Copy link
Contributor

@mattt mattt left a comment

Choose a reason for hiding this comment

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

🙌

Currently we include all files including tests, ci scripts and
tooling config.

See: https://npmfs.com/package/replicate/0.25.2/
@aron
Copy link
Contributor Author

aron commented Jan 17, 2024

@mattt just updated this to run the integration tests on ci on a tarball of the module generated with npm pack. This should validate that we've included all the correct files.

@aron aron force-pushed the package-files branch 3 times, most recently from 464d237 to 5675146 Compare January 17, 2024 15:43
@aron aron merged commit bfef365 into main Jan 17, 2024
@aron aron deleted the package-files branch January 17, 2024 16:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants