@acm-uiuc/js-shared 3.4.0 → 3.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -1,3 +1,3 @@
1
- export * from "./orgs";
2
- export * from "./constants";
3
- export * from "./util";
1
+ export * from "./orgs.js";
2
+ export * from "./constants.js";
3
+ export * from "./util.js";
package/dist/index.js CHANGED
@@ -1,3 +1,3 @@
1
- export * from "./orgs";
2
- export * from "./constants";
3
- export * from "./util";
1
+ export * from "./orgs.js";
2
+ export * from "./constants.js";
3
+ export * from "./util.js";
package/dist/orgs.d.ts CHANGED
@@ -12,6 +12,7 @@ export type Organization = {
12
12
  shortcode: string;
13
13
  color: string;
14
14
  stripeAccountId?: string;
15
+ contactEmailOverride?: string;
15
16
  };
16
17
  export declare const Organizations: {
17
18
  readonly [K in OrganizationId]: Organization;
package/dist/orgs.js CHANGED
@@ -8,42 +8,196 @@ export var OrgType;
8
8
  // IDs are the source of truth
9
9
  export const AllOrganizationIdList = [
10
10
  "A01",
11
- "S01", "S02", "S03", "S04", "S05", "S06", "S07", "S08", "S09",
12
- "S10", "S11", "S12", "S13", "S14", "S15", "S16", "S17", "S18",
13
- "C01", "C02", "C03", "C04", "C05", "C06", "C07", "C08",
11
+ "S01",
12
+ "S02",
13
+ "S03",
14
+ "S04",
15
+ "S05",
16
+ "S06",
17
+ "S07",
18
+ "S08",
19
+ "S09",
20
+ "S10",
21
+ "S11",
22
+ "S12",
23
+ "S13",
24
+ "S14",
25
+ "S15",
26
+ "S16",
27
+ "S17",
28
+ "S18",
29
+ "C01",
30
+ "C02",
31
+ "C03",
32
+ "C04",
33
+ "C05",
34
+ "C06",
35
+ "C07",
36
+ "C08",
14
37
  ];
15
38
  // This MUST have an entry for every ID (compile error if missing)
16
39
  export const Organizations = {
17
- "A01": { name: "ACM", type: OrgType.MAIN, shortcode: "acm", color: "#4577f8", stripeAccountId: "acct_19mShiDiGOXU9RuS" },
18
- "S01": { name: "SIGPwny", type: OrgType.SIG, shortcode: "sigpwny", color: "#33cc55" },
19
- "S02": { name: "SIGCHI", type: OrgType.SIG, shortcode: "sigchi", color: "#EEAE48" },
20
- "S03": { name: "GameBuilders", type: OrgType.SIG, shortcode: "gamebuilders", color: "#29386D" },
21
- "S04": { name: "SIGAIDA", type: OrgType.SIG, shortcode: "sigaida", color: "#BFDDFC" },
22
- "S05": { name: "SIGGRAPH", type: OrgType.SIG, shortcode: "siggraph", color: "#7896A7" },
23
- "S06": { name: "ICPC", type: OrgType.SIG, shortcode: "icpc", color: "#AF2A23" },
24
- "S07": { name: "SIGMobile", type: OrgType.SIG, shortcode: "sigmobile", color: "#0C7BBD" },
25
- "S08": { name: "SIGMusic", type: OrgType.SIG, shortcode: "sigmusic", color: "#F4DCA3" },
26
- "S09": { name: "GLUG", type: OrgType.SIG, shortcode: "glug", color: "#E94A27" },
27
- "S10": { name: "SIGNLL", type: OrgType.SIG, shortcode: "signll", color: "#F59A23" },
28
- "S11": { name: "SIGma", type: OrgType.SIG, shortcode: "sigma", color: "#4B65F2" },
29
- "S12": { name: "SIGQuantum", type: OrgType.SIG, shortcode: "sigquantum", color: "#233643" },
30
- "S13": { name: "SIGecom", type: OrgType.SIG, shortcode: "sigecom", color: "#00759A" },
31
- "S14": { name: "SIGPLAN", type: OrgType.SIG, shortcode: "sigplan", color: "#4577f8" },
32
- "S15": { name: "SIGPolicy", type: OrgType.SIG, shortcode: "sigpolicy", color: "#292929" },
33
- "S16": { name: "SIGARCH", type: OrgType.SIG, shortcode: "sigarch", color: "#155CD0" },
34
- "S17": { name: "SIGRobotics", type: OrgType.SIG, shortcode: "sigrobotics", color: "#B0B0B0" },
35
- "S18": { name: "SIGtricity", type: OrgType.SIG, shortcode: "sigtricity", color: "#4577f8" },
36
- "C01": { name: "Infrastructure Committee", type: OrgType.COMMITTEE, shortcode: "infra", color: "#4577f8" },
37
- "C02": { name: "Social Committee", type: OrgType.COMMITTEE, shortcode: "social", color: "#4577f8" },
38
- "C03": { name: "Mentorship Committee", type: OrgType.COMMITTEE, shortcode: "mentorship", color: "#4577f8" },
39
- "C04": { name: "Academic Committee", type: OrgType.COMMITTEE, shortcode: "academic", color: "#4577f8" },
40
- "C05": { name: "Corporate Committee", type: OrgType.COMMITTEE, shortcode: "corporate", color: "#4577f8" },
41
- "C06": { name: "Marketing Committee", type: OrgType.COMMITTEE, shortcode: "marketing", color: "#4577f8" },
42
- "C07": { name: "Reflections | Projections", type: OrgType.COMMITTEE, shortcode: "reflproj", color: "#4577f8" },
43
- "C08": { name: "HackIllinois", type: OrgType.COMMITTEE, shortcode: "hackillinois", color: "#4577f8" },
40
+ A01: {
41
+ name: "ACM",
42
+ type: OrgType.MAIN,
43
+ shortcode: "acm",
44
+ color: "#4577f8",
45
+ stripeAccountId: "acct_19mShiDiGOXU9RuS",
46
+ contactEmailOverride: "officers@acm.illinois.edu",
47
+ },
48
+ S01: {
49
+ name: "SIGPwny",
50
+ type: OrgType.SIG,
51
+ shortcode: "sigpwny",
52
+ color: "#33cc55",
53
+ },
54
+ S02: {
55
+ name: "SIGCHI",
56
+ type: OrgType.SIG,
57
+ shortcode: "sigchi",
58
+ color: "#EEAE48",
59
+ },
60
+ S03: {
61
+ name: "GameBuilders",
62
+ type: OrgType.SIG,
63
+ shortcode: "gamebuilders",
64
+ color: "#29386D",
65
+ },
66
+ S04: {
67
+ name: "SIGAIDA",
68
+ type: OrgType.SIG,
69
+ shortcode: "sigaida",
70
+ color: "#BFDDFC",
71
+ },
72
+ S05: {
73
+ name: "SIGGRAPH",
74
+ type: OrgType.SIG,
75
+ shortcode: "siggraph",
76
+ color: "#7896A7",
77
+ },
78
+ S06: { name: "ICPC", type: OrgType.SIG, shortcode: "icpc", color: "#AF2A23" },
79
+ S07: {
80
+ name: "SIGMobile",
81
+ type: OrgType.SIG,
82
+ shortcode: "sigmobile",
83
+ color: "#0C7BBD",
84
+ },
85
+ S08: {
86
+ name: "SIGMusic",
87
+ type: OrgType.SIG,
88
+ shortcode: "sigmusic",
89
+ color: "#F4DCA3",
90
+ },
91
+ S09: { name: "GLUG", type: OrgType.SIG, shortcode: "glug", color: "#E94A27" },
92
+ S10: {
93
+ name: "SIGNLL",
94
+ type: OrgType.SIG,
95
+ shortcode: "signll",
96
+ color: "#F59A23",
97
+ },
98
+ S11: {
99
+ name: "SIGma",
100
+ type: OrgType.SIG,
101
+ shortcode: "sigma",
102
+ color: "#4B65F2",
103
+ },
104
+ S12: {
105
+ name: "SIGQuantum",
106
+ type: OrgType.SIG,
107
+ shortcode: "sigquantum",
108
+ color: "#233643",
109
+ },
110
+ S13: {
111
+ name: "SIGecom",
112
+ type: OrgType.SIG,
113
+ shortcode: "sigecom",
114
+ color: "#00759A",
115
+ },
116
+ S14: {
117
+ name: "SIGPLAN",
118
+ type: OrgType.SIG,
119
+ shortcode: "sigplan",
120
+ color: "#4577f8",
121
+ },
122
+ S15: {
123
+ name: "SIGPolicy",
124
+ type: OrgType.SIG,
125
+ shortcode: "sigpolicy",
126
+ color: "#292929",
127
+ },
128
+ S16: {
129
+ name: "SIGARCH",
130
+ type: OrgType.SIG,
131
+ shortcode: "sigarch",
132
+ color: "#155CD0",
133
+ },
134
+ S17: {
135
+ name: "SIGRobotics",
136
+ type: OrgType.SIG,
137
+ shortcode: "sigrobotics",
138
+ color: "#B0B0B0",
139
+ contactEmailOverride: "sigrobotics@acm.illinois.edu",
140
+ },
141
+ S18: {
142
+ name: "SIGtricity",
143
+ type: OrgType.SIG,
144
+ shortcode: "sigtricity",
145
+ color: "#4577f8",
146
+ },
147
+ C01: {
148
+ name: "Infrastructure Committee",
149
+ type: OrgType.COMMITTEE,
150
+ shortcode: "infra",
151
+ color: "#4577f8",
152
+ contactEmailOverride: "infra@acm.illinois.edu",
153
+ },
154
+ C02: {
155
+ name: "Social Committee",
156
+ type: OrgType.COMMITTEE,
157
+ shortcode: "social",
158
+ color: "#4577f8",
159
+ },
160
+ C03: {
161
+ name: "Mentorship Committee",
162
+ type: OrgType.COMMITTEE,
163
+ shortcode: "mentorship",
164
+ color: "#4577f8",
165
+ },
166
+ C04: {
167
+ name: "Academic Committee",
168
+ type: OrgType.COMMITTEE,
169
+ shortcode: "academic",
170
+ color: "#4577f8",
171
+ contactEmailOverride: "academic@acm.illinois.edu",
172
+ },
173
+ C05: {
174
+ name: "Corporate Committee",
175
+ type: OrgType.COMMITTEE,
176
+ shortcode: "corporate",
177
+ color: "#4577f8",
178
+ contactEmailOverride: "corporate@acm.illinois.edu",
179
+ },
180
+ C06: {
181
+ name: "Marketing Committee",
182
+ type: OrgType.COMMITTEE,
183
+ shortcode: "marketing",
184
+ color: "#4577f8",
185
+ },
186
+ C07: {
187
+ name: "Reflections | Projections",
188
+ type: OrgType.COMMITTEE,
189
+ shortcode: "reflproj",
190
+ color: "#4577f8",
191
+ },
192
+ C08: {
193
+ name: "HackIllinois",
194
+ type: OrgType.COMMITTEE,
195
+ shortcode: "hackillinois",
196
+ color: "#4577f8",
197
+ },
44
198
  };
45
199
  export const OrganizationsByName = Object.fromEntries(Object.entries(Organizations).map(([id, org]) => [org.name, id]));
46
- export const AllOrganizationNameList = AllOrganizationIdList.map(id => Organizations[id].name);
200
+ export const AllOrganizationNameList = AllOrganizationIdList.map((id) => Organizations[id].name);
47
201
  // Helper to get ID from name (typed return)
48
202
  export function getOrgIdByName(name) {
49
203
  return OrganizationsByName[name];
@@ -61,7 +215,5 @@ export function isValidOrgId(id) {
61
215
  return id in Organizations;
62
216
  }
63
217
  export function getOrgsByType(type) {
64
- return AllOrganizationIdList
65
- .filter(id => Organizations[id].type === type)
66
- .map(id => ({ ...Organizations[id], id }));
218
+ return AllOrganizationIdList.filter((id) => Organizations[id].type === type).map((id) => ({ ...Organizations[id], id }));
67
219
  }
package/package.json CHANGED
@@ -1,12 +1,14 @@
1
1
  {
2
2
  "name": "@acm-uiuc/js-shared",
3
- "version": "3.4.0",
3
+ "version": "3.6.0",
4
4
  "description": "ACM UIUC Shared JS code",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.js",
7
7
  "types": "dist/index.d.ts",
8
8
  "scripts": {
9
- "build": "tsc"
9
+ "build": "tsc",
10
+ "format:check": "prettier . --check && eslint .",
11
+ "format:fix": "prettier . --write && eslint . --fix"
10
12
  },
11
13
  "files": [
12
14
  "dist"
@@ -23,7 +25,16 @@
23
25
  "homepage": "https://github.com/acm-uiuc/js-shared#readme",
24
26
  "packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e",
25
27
  "devDependencies": {
26
- "typescript": "^5.8.3"
28
+ "@eslint/js": "^10.0.1",
29
+ "@typescript-eslint/eslint-plugin": "^8.55.0",
30
+ "@typescript-eslint/parser": "^8.55.0",
31
+ "eslint": "^10.0.0",
32
+ "eslint-config-prettier": "^10.1.8",
33
+ "eslint-plugin-prettier": "^5.5.5",
34
+ "globals": "^17.3.0",
35
+ "prettier": "^3.8.1",
36
+ "typescript": "^5.8.3",
37
+ "typescript-eslint": "^8.55.0"
27
38
  },
28
39
  "publishConfig": {
29
40
  "registry": "https://registry.npmjs.org"