Skip to content

Commit

Permalink
Make @keystone-6/core/artifacts private (#7972)
Browse files Browse the repository at this point in the history
* Make `@keystone-6/core/artifacts` private

* update changeset

Co-authored-by: Daniel Cousens <413395+dcousens@users.noreply.github.com>
  • Loading branch information
emmatown and dcousens committed Oct 4, 2022
1 parent a8a5f1f commit 81f33ee
Show file tree
Hide file tree
Showing 9 changed files with 24 additions and 13 deletions.
5 changes: 5 additions & 0 deletions .changeset/odd-files-battle.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@keystone-6/core': major
---

Removes `@keystone-6/core/artifacts` from our exports
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"main": "dist/keystone-6-core-___internal-do-not-use-will-break-in-patch-node-api.cjs.js",
"module": "dist/keystone-6-core-___internal-do-not-use-will-break-in-patch-node-api.esm.js"
"main": "dist/keystone-6-core-___internal-do-not-use-will-break-in-patch-artifacts.cjs.js",
"module": "dist/keystone-6-core-___internal-do-not-use-will-break-in-patch-artifacts.esm.js"
}
4 changes: 0 additions & 4 deletions packages/core/artifacts/package.json

This file was deleted.

6 changes: 3 additions & 3 deletions packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
"files": [
"session",
"bin",
"artifacts",
"___internal-do-not-use-will-break-in-patch",
"migrations",
"next",
Expand Down Expand Up @@ -127,10 +126,11 @@
"index.ts",
"system.ts",
"next.ts",
"___internal-do-not-use-will-break-in-patch/{node-api,next-graphql,load-config}.ts",
"___internal-do-not-use-will-break-in-patch/next-graphql.ts",
"___internal-do-not-use-will-break-in-patch/load-config.ts",
"___internal-do-not-use-will-break-in-patch/artifacts.ts",
"___internal-do-not-use-will-break-in-patch/admin-ui/pages/*/index.tsx",
"___internal-do-not-use-will-break-in-patch/admin-ui/{next-config.ts,id-field-view.tsx}",
"artifacts.ts",
"context.ts",
"migrations.ts",
"testing.ts",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
export {
validateCommittedArtifacts,
generateNodeModulesArtifacts,
generateCommittedArtifacts,
getCommittedArtifacts,
} from '../artifacts';
export type { PrismaModule } from '../artifacts';
2 changes: 1 addition & 1 deletion scripts/generate-artifacts-for-projects/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
validateCommittedArtifacts,
generateNodeModulesArtifacts,
generateCommittedArtifacts,
} from '@keystone-6/core/artifacts';
} from '@keystone-6/core/___internal-do-not-use-will-break-in-patch/artifacts';
import { loadConfig } from '@keystone-6/core/___internal-do-not-use-will-break-in-patch/load-config';

const mode = process.argv.includes('update-schemas') ? 'generate' : 'validate';
Expand Down
2 changes: 1 addition & 1 deletion tests/api-tests/indexes.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { list } from '@keystone-6/core';
import { allowAll } from '@keystone-6/core/access';
import { getCommittedArtifacts } from '@keystone-6/core/artifacts';
import { getCommittedArtifacts } from '@keystone-6/core/___internal-do-not-use-will-break-in-patch/artifacts';
import { select, text } from '@keystone-6/core/fields';
import { createSystem, initConfig } from '@keystone-6/core/system';
import { setupTestEnv } from '@keystone-6/api-tests/test-runner';
Expand Down
5 changes: 4 additions & 1 deletion tests/api-tests/test-runner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,10 @@ import type {
KeystoneConfig,
KeystoneContext,
} from '@keystone-6/core/types';
import { getCommittedArtifacts, PrismaModule } from '@keystone-6/core/artifacts';
import {
getCommittedArtifacts,
PrismaModule,
} from '@keystone-6/core/___internal-do-not-use-will-break-in-patch/artifacts';
import prismaClientPackageJson from '@prisma/client/package.json';
import { runMigrateWithDbUrl, withMigrate } from '@keystone-6/core/src/lib/migrations';
import { dbProvider, dbUrl, SQLITE_DATABASE_FILENAME } from './utils';
Expand Down
2 changes: 1 addition & 1 deletion tests/api-tests/utils.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { initConfig, createSystem } from '@keystone-6/core/system';
import { getCommittedArtifacts } from '@keystone-6/core/artifacts';
import { getCommittedArtifacts } from '@keystone-6/core/___internal-do-not-use-will-break-in-patch/artifacts';
import { KeystoneConfig, KeystoneContext, DatabaseProvider } from '@keystone-6/core/types';
import { setupTestRunner } from '@keystone-6/core/testing';

Expand Down

1 comment on commit 81f33ee

@vercel
Copy link

@vercel vercel bot commented on 81f33ee Oct 4, 2022

Choose a reason for hiding this comment

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

Please sign in to comment.