Skip to content

Commit

Permalink
Merge pull request #1479 from glimmerjs/more-cjs-re-adding
Browse files Browse the repository at this point in the history
CJS needs to be enabled entirely, because ember-source requires it for now
  • Loading branch information
NullVoxPopuli authored Oct 31, 2023
2 parents de418ee + 26c4cf3 commit 17764c0
Show file tree
Hide file tree
Showing 45 changed files with 277 additions and 379 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,4 @@ tmp/
instrumentation.*.json
.cache
**/.yalc
**/*.tgz
4 changes: 2 additions & 2 deletions packages/@glimmer-workspace/build/lib/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ export class Package {
/**
* @typedef {object} Formats
* @property {boolean} [ esm ] enabled by default
* @property {boolean} [ cjs ] disabled by default
* @property {boolean} [ cjs ] enabled by default until eslint-plugin-ember and ember-source no longer need it
*
* @returns {import("rollup").RollupOptions[] | import("rollup").RollupOptions}
*/
Expand All @@ -257,7 +257,7 @@ export class Package {
builds.push(...this.rollupESM({ env: 'prod' }));
}

if (formats.cjs) {
if (formats.cjs ?? true) {
builds.push(...this.rollupCJS({ env: 'dev' }));
}

Expand Down
1 change: 1 addition & 0 deletions packages/@glimmer/compiler/.npmignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
test/
index.ts
9 changes: 5 additions & 4 deletions packages/@glimmer/compiler/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,20 @@
],
"publishConfig": {
"access": "public",
"main": "dist/prod/index.js",
"types": "dist/dev/index.d.ts",
"exports": {
".": {
"types": "./dist/dev/index.d.ts",
"development": {
"require": "./dist/dev/index.cjs",
"default": "./dist/dev/index.js"
"import": "./dist/dev/index.js"
},
"require": "./dist/dev/index.cjs",
"default": "./dist/prod/index.js"
"import": "./dist/dev/index.js"
}
}
},
"main": null,
"module": null
},
"dependencies": {
"@glimmer/interfaces": "workspace:^",
Expand Down
2 changes: 1 addition & 1 deletion packages/@glimmer/compiler/rollup.config.mjs
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
import { Package } from '@glimmer-workspace/build-support';

export default Package.config(import.meta, { esm: true, cjs: true });
export default Package.config(import.meta);
1 change: 1 addition & 0 deletions packages/@glimmer/debug/.npmignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
test/
index.ts
10 changes: 4 additions & 6 deletions packages/@glimmer/debug/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,15 @@
],
"publishConfig": {
"access": "public",
"main": "dist/prod/index.js",
"types": "dist/dev/index.d.ts",
"exports": {
".": {
"types": "./dist/dev/index.d.ts",
"development": {
"default": "./dist/dev/index.js"
},
"default": "./dist/prod/index.js"
"development": {}
}
}
},
"main": null,
"module": null
},
"dependencies": {
"@glimmer/interfaces": "workspace:^",
Expand Down
1 change: 1 addition & 0 deletions packages/@glimmer/destroyable/.npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
index.ts
10 changes: 4 additions & 6 deletions packages/@glimmer/destroyable/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,15 @@
],
"publishConfig": {
"access": "public",
"main": "dist/prod/index.js",
"types": "dist/dev/index.d.ts",
"exports": {
".": {
"types": "./dist/dev/index.d.ts",
"development": {
"default": "./dist/dev/index.js"
},
"default": "./dist/prod/index.js"
"development": {}
}
}
},
"main": null,
"module": null
},
"dependencies": {
"@glimmer/env": "0.1.7",
Expand Down
1 change: 1 addition & 0 deletions packages/@glimmer/dom-change-list/.npmignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
test/
index.ts
11 changes: 7 additions & 4 deletions packages/@glimmer/dom-change-list/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,20 @@
"types": "index.ts",
"publishConfig": {
"access": "public",
"main": "dist/prod/index.js",
"types": "dist/dev/index.d.ts",
"exports": {
".": {
"types": "./dist/dev/index.d.ts",
"development": {
"default": "./dist/dev/index.js"
"require": "./dist/dev/index.cjs",
"import": "./dist/dev/index.js"
},
"default": "./dist/prod/index.js"
"require": "./dist/dev/index.cjs",
"import": "./dist/prod/index.js"
}
}
},
"main": null,
"module": null
},
"files": [
"dist"
Expand Down
1 change: 1 addition & 0 deletions packages/@glimmer/encoder/.npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
index.ts
11 changes: 7 additions & 4 deletions packages/@glimmer/encoder/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,20 @@
"types": "index.ts",
"publishConfig": {
"access": "public",
"main": "dist/prod/index.js",
"types": "dist/dev/index.d.ts",
"exports": {
".": {
"types": "./dist/dev/index.d.ts",
"development": {
"default": "./dist/dev/index.js"
"require": "./dist/dev/index.cjs",
"import": "./dist/dev/index.js"
},
"default": "./dist/prod/index.js"
"require": "./dist/dev/index.cjs",
"import": "./dist/prod/index.js"
}
}
},
"main": null,
"module": null
},
"files": [
"dist"
Expand Down
1 change: 1 addition & 0 deletions packages/@glimmer/global-context/.npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
index.ts
11 changes: 7 additions & 4 deletions packages/@glimmer/global-context/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,20 @@
],
"publishConfig": {
"access": "public",
"main": "./dist/prod/index.js",
"types": "./dist/dev/index.d.ts",
"exports": {
".": {
"types": "./dist/dev/index.d.ts",
"development": {
"default": "./dist/dev/index.js"
"require": "./dist/dev/index.cjs",
"import": "./dist/dev/index.js"
},
"default": "./dist/prod/index.js"
"require": "./dist/dev/index.cjs",
"import": "./dist/prod/index.js"
}
}
},
"main": null,
"module": null
},
"scripts": {
"test:lint": "eslint .",
Expand Down
4 changes: 3 additions & 1 deletion packages/@glimmer/interfaces/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@
"test:publint": "publint"
},
"publishConfig": {
"access": "public"
"access": "public",
"main": null,
"module": null
},
"dependencies": {
"@simple-dom/interface": "^1.4.0"
Expand Down
1 change: 1 addition & 0 deletions packages/@glimmer/manager/.npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
index.ts
11 changes: 7 additions & 4 deletions packages/@glimmer/manager/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,17 +28,20 @@
"types": "index.ts",
"publishConfig": {
"access": "public",
"main": "dist/prod/index.js",
"types": "dist/dev/index.d.ts",
"exports": {
".": {
"types": "./dist/dev/index.d.ts",
"development": {
"default": "./dist/dev/index.js"
"require": "./dist/dev/index.cjs",
"import": "./dist/dev/index.js"
},
"default": "./dist/prod/index.js"
"require": "./dist/dev/index.cjs",
"import": "./dist/prod/index.js"
}
}
},
"main": null,
"module": null
},
"scripts": {
"test:lint": "eslint .",
Expand Down
1 change: 1 addition & 0 deletions packages/@glimmer/node/.npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
index.ts
11 changes: 7 additions & 4 deletions packages/@glimmer/node/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,19 @@
"types": "index.ts",
"publishConfig": {
"access": "public",
"main": "dist/prod/index.js",
"types": "dist/dev/index.d.ts",
"exports": {
".": {
"types": "./dist/dev/index.d.ts",
"development": {
"default": "./dist/dev/index.js"
"require": "./dist/dev/index.cjs",
"import": "./dist/dev/index.js"
},
"default": "./dist/prod/index.js"
"require": "./dist/dev/index.cjs",
"import": "./dist/prod/index.js"
}
}
},
"main": null,
"module": null
}
}
1 change: 1 addition & 0 deletions packages/@glimmer/opcode-compiler/.npmignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
test/
index.ts
11 changes: 7 additions & 4 deletions packages/@glimmer/opcode-compiler/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,16 +35,19 @@
"types": "index.ts",
"publishConfig": {
"access": "public",
"main": "dist/prod/index.js",
"types": "dist/dev/index.d.ts",
"exports": {
".": {
"types": "./dist/dev/index.d.ts",
"development": {
"default": "./dist/dev/index.js"
"require": "./dist/dev/index.cjs",
"import": "./dist/dev/index.js"
},
"default": "./dist/prod/index.js"
"require": "./dist/dev/index.cjs",
"import": "./dist/prod/index.js"
}
}
},
"main": null,
"module": null
}
}
2 changes: 2 additions & 0 deletions packages/@glimmer/owner/.npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
test/
index.ts
11 changes: 7 additions & 4 deletions packages/@glimmer/owner/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,19 @@
"types": "index.ts",
"publishConfig": {
"access": "public",
"main": "dist/prod/index.js",
"types": "dist/dev/index.d.ts",
"exports": {
".": {
"types": "./dist/dev/index.d.ts",
"development": {
"default": "./dist/dev/index.js"
"require": "./dist/dev/index.cjs",
"import": "./dist/dev/index.js"
},
"default": "./dist/prod/index.js"
"require": "./dist/dev/index.cjs",
"import": "./dist/prod/index.js"
}
}
},
"main": null,
"module": null
}
}
1 change: 1 addition & 0 deletions packages/@glimmer/program/.npmignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
test/
index.ts
11 changes: 7 additions & 4 deletions packages/@glimmer/program/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,17 +27,20 @@
"types": "index.ts",
"publishConfig": {
"access": "public",
"main": "dist/prod/index.js",
"types": "dist/dev/index.d.ts",
"exports": {
".": {
"types": "./dist/dev/index.d.ts",
"development": {
"default": "./dist/dev/index.js"
"require": "./dist/dev/index.cjs",
"import": "./dist/dev/index.js"
},
"default": "./dist/prod/index.js"
"require": "./dist/dev/index.cjs",
"import": "./dist/prod/index.js"
}
}
},
"main": null,
"module": null
},
"scripts": {
"test:lint": "eslint .",
Expand Down
1 change: 1 addition & 0 deletions packages/@glimmer/reference/.npmignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
test/
index.ts
11 changes: 7 additions & 4 deletions packages/@glimmer/reference/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,16 +36,19 @@
"types": "index.ts",
"publishConfig": {
"access": "public",
"main": "dist/prod/index.js",
"types": "dist/dev/index.d.ts",
"exports": {
".": {
"types": "./dist/dev/index.d.ts",
"development": {
"default": "./dist/dev/index.js"
"require": "./dist/dev/index.cjs",
"import": "./dist/dev/index.js"
},
"default": "./dist/prod/index.js"
"require": "./dist/dev/index.cjs",
"import": "./dist/prod/index.js"
}
}
},
"main": null,
"module": null
}
}
1 change: 1 addition & 0 deletions packages/@glimmer/runtime/.npmignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
test/
index.ts
9 changes: 5 additions & 4 deletions packages/@glimmer/runtime/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,18 @@
],
"publishConfig": {
"access": "public",
"main": "dist/prod/index.js",
"types": "dist/dev/index.d.ts",
"exports": {
".": {
"types": "./dist/dev/index.d.ts",
"development": {
"default": "./dist/dev/index.js"
"import": "./dist/dev/index.js"
},
"default": "./dist/prod/index.js"
"import": "./dist/prod/index.js"
}
}
},
"main": null,
"module": null
},
"dependencies": {
"@glimmer/destroyable": "workspace:^",
Expand Down
1 change: 1 addition & 0 deletions packages/@glimmer/syntax/.npmignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
test/
index.ts
Loading

0 comments on commit 17764c0

Please sign in to comment.