Skip to content

Commit 2b49377

Browse files
committed
refactor: Just let the extension be its own entire package (duh)
1 parent 0e15d8e commit 2b49377

22 files changed

+53
-89
lines changed

constraints.pro

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@ workspace_basename(WorkspaceCwd, WorkspaceBasename) :-
9999
% and is not private.
100100
workspace_package_name(WorkspaceCwd, WorkspacePackageName) :-
101101
workspace_basename(WorkspaceCwd, WorkspaceBasename),
102+
workspace_field(WorkspaceCwd, 'private', false),
102103
atom_concat('@metamask/', WorkspaceBasename, WorkspacePackageName).
103104

104105
% True if RepoName can be unified with the repository name part of RepoUrl, a
@@ -255,11 +256,12 @@ gen_enforced_field(WorkspaceCwd, 'files', []) :-
255256

256257
% All non-root packages must have the same "build" script.
257258
gen_enforced_field(WorkspaceCwd, 'scripts.build', 'ts-bridge --project tsconfig.build.json --clean') :-
258-
WorkspaceCwd \= 'packages/ocap-skunkworks',
259+
WorkspaceCwd \= 'packages/extension',
259260
WorkspaceCwd \= '.'.
260261

261262
% All non-root packages must have the same "build:docs" script.
262263
gen_enforced_field(WorkspaceCwd, 'scripts.build:docs', 'typedoc') :-
264+
WorkspaceCwd \= 'packages/extension',
263265
WorkspaceCwd \= '.'.
264266

265267
% All published packages must have the same "publish:preview" script.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@
1111
"packages/*"
1212
],
1313
"scripts": {
14-
"build": "yarn run build:source && yarn run build:types",
14+
"build": "yarn run build:source",
1515
"build:clean": "yarn clean && yarn build",
16-
"build:docs": "yarn workspaces foreach --all --exclude ocap-kernel-monorepo --parallel --interlaced --verbose run build:docs",
16+
"build:docs": "yarn workspaces foreach --all --exclude ocap-kernel-monorepo --exclude extension --parallel --interlaced --verbose run build:docs",
1717
"build:source": "yarn workspaces foreach --all --parallel --exclude ocap-kernel-monorepo --interlaced --verbose run build",
1818
"build:types": "tsc --build tsconfig.build.json --verbose",
1919
"build:watch": "yarn run build --watch",

packages/ocap-skunkworks/.eslintrc.js renamed to packages/extension/.eslintrc.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ module.exports = {
33

44
overrides: [
55
{
6-
files: ['src/extension/**/*.js'],
6+
files: ['src/**/*.js'],
77
globals: { chrome: 'readonly', clients: 'readonly' },
88
},
99

@@ -16,7 +16,7 @@ module.exports = {
1616
},
1717

1818
{
19-
files: ['vite.*.mts'],
19+
files: ['vite.config.mts'],
2020
parserOptions: {
2121
sourceType: 'module',
2222
tsconfigRootDir: __dirname,

packages/ocap-skunkworks/README.md renamed to packages/extension/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
# `@metamask/ocap-skunkworks`
1+
# `extension`
22

3-
A home for Ocap Kernel experiments.
3+
For running Ocap Kernel experiments in an extension environment.
44

55
## Installation
66

7-
`yarn add @metamask/ocap-skunkworks`
7+
`yarn add extension`
88

99
or
1010

11-
`npm install @metamask/ocap-skunkworks`
11+
`npm install extension`
1212

1313
## Contributing
1414

packages/ocap-skunkworks/package.json renamed to packages/extension/package.json

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
2-
"name": "@metamask/ocap-skunkworks",
2+
"name": "extension",
33
"version": "0.0.0",
44
"private": true,
5-
"description": "A home for Ocap Kernel experiments",
5+
"description": "For running Ocap Kernel experiments in an extension environment",
66
"repository": {
77
"type": "git",
88
"url": "https://github.com/MetaMask/ocap-kernel.git"
@@ -11,14 +11,11 @@
1111
"dist/"
1212
],
1313
"scripts": {
14-
"build": "yarn build:extension",
15-
"build:docs": "typedoc",
16-
"build:extension": "yarn check:types:extension && vite build -c vite.config.extension.mts",
17-
"build:library": "ts-bridge --project tsconfig.build.json --clean",
18-
"changelog:validate": "../../scripts/validate-changelog.sh @metamask/ocap-skunkworks",
19-
"check:types:extension": "tsc --project src/extension/tsconfig.json",
14+
"build": "yarn check:types && vite build -c vite.config.mts",
15+
"changelog:validate": "../../scripts/validate-changelog.sh extension",
16+
"check:types": "tsc",
2017
"publish:preview": "yarn npm publish --tag preview",
21-
"start": "vite -c vite.config.extension.mts",
18+
"start": "vite -c vite.config.mts",
2219
"test": "jest --reporters=jest-silent-reporter",
2320
"posttest": "jest-it-up",
2421
"test:clean": "jest --clearCache",

packages/ocap-skunkworks/src/extension/apply-lockdown.mjs renamed to packages/extension/src/apply-lockdown.mjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import './ses.mjs';
2-
import './lockdown.mjs';
1+
import './ses.mjs.js';
2+
import './lockdown.mjs.js';
33

44
lockdown({
55
consoleTaming: 'unsafe',

packages/ocap-skunkworks/src/extension/manifest.json renamed to packages/extension/src/manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "Ocap Kernel Skunkworks Extension",
2+
"name": "Ocap Kernel Test Extension",
33
"version": "0.0",
44
"description": "For running Ocap Kernel experiments in an extension environment.",
55
"manifest_version": 3,

0 commit comments

Comments
 (0)