Skip to content

Commit

Permalink
Make @keystone-6/core/artifacts private
Browse files Browse the repository at this point in the history
  • Loading branch information
emmatown committed Sep 30, 2022
1 parent 494cdef commit 41e8a4d
Show file tree
Hide file tree
Showing 10 changed files with 24 additions and 18 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`
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/src/artifacts';
import { KeystoneConfig, KeystoneContext, DatabaseProvider } from '@keystone-6/core/types';
import { setupTestRunner } from '@keystone-6/core/testing';

Expand Down
5 changes: 0 additions & 5 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -10293,11 +10293,6 @@ memoize-one@^5.0.0:
resolved "https://registry.yarnpkg.com/memoize-one/-/memoize-one-5.2.1.tgz#8337aa3c4335581839ec01c3d594090cebe8f00e"
integrity sha512-zYiwtZUcYyXKo/np96AGZAckk+FWWsUdJ3cHGGmld7+AhvcWmQyGCYUh1hc4Q/pkOhb65dQR/pqCyK0cOaHz4Q==

memoize-one@^6.0.0:
version "6.0.0"
resolved "https://registry.yarnpkg.com/memoize-one/-/memoize-one-6.0.0.tgz#b2591b871ed82948aee4727dc6abceeeac8c1045"
integrity sha512-rkpe71W0N0c0Xz6QD0eJETuWAJGnJ9afsl1srmwPrI+yBCkge5EycXXbYRyvL29zZVUWQCY7InPRCv3GDXuZNw==

memory-pager@^1.0.2:
version "1.5.0"
resolved "https://registry.yarnpkg.com/memory-pager/-/memory-pager-1.5.0.tgz#d8751655d22d384682741c972f2c3d6dfa3e66b5"
Expand Down

0 comments on commit 41e8a4d

Please sign in to comment.